Pike on Windows

[ Start > PikeDevel > Pike on Windows ] [ Edit this Page | Show Page Versions | Show Raw Source ]

Starting with version 7.7, Pike can be compiled directly on Windows. This technique uses MinGW and MSYS to produce a native Windows binary (ie there's no POSIX compatibility layer as with CygWin).

This technique seems to work, however there are some issues currently. The most serious of these seems to be the lack of working dynamic modules.

A more promising technique is to use the freely available Microsoft Visual C++ Toolkit, which contains the "cl" command line compiler, and the Microsoft Platform SDK, which contains all of the necessary headers and libraries. Unfortunately certain functionality that the windows build of Pike relies on has been removed from this newest release of VC++, so for now, we're stuck using VC++ 6.0.

Install Pike for Windows, MinGW and MSYS. Also install bison for Windows and make sure it is in your PATH.

We then use rnctl, a pike script which converts gcc command line options into cl command line options.

You'll need the following in $HOME/nt-tools/tools:

- rntcl

  • ar
  • pntld
  • ranlib

PATH=/c/progra~1/micros~3/vc98/bin:$HOME/nt-tools/tools:/c/progra~1/Pike:$PATH export PATH LDFLAGS="-LC:/Progra~1/micros~3/vc98/lib -LC:/Progra~1/thirdpartylibs/lib" export LDFLAGS CPPFLAGS="-IC:/Progra~1/micros~3/vc98/include -IC:/Progra~1/thirdpartylibs/include" export CPPFLAGS INCLUDE=C:\Program Files\Microsoft Visual Studio\VC98\include LIB=C:\Program Files\Microsoft Visual Studio\VC98\lib export INCLUDE LIB

NTTOOLS=$HOME/nt-tools/tools/lib CC=rntcl make

snprintf is _snprintf, the fix for the LARGE_INTEGER casting in fdlib.c (LARGE_INTEGER is a struct, and you can't cast an int64 to a struct) is:


li.QuadValue = pos;

The general procedure:

install a standard windows build of pike.

download a snapshot of pike from 7.7 cvs

compile gmp as usual:

cd to bundles untar gmp ./configure make make install

compile nettle:

cd to bundles untar nettle-1.12.tar.gz untar nettle-1.12.ptar.gz

set env variables:

CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" export CFLAGS LDFLAGS

compile nettle:

./configure --disable-assembler make make install

compile pike 7.7:

./configure make make install

Powered by PikeWiki2

gotpike.org | Copyright © 2004 - 2009 | Pike is a trademark of Department of Computer and Information Science, Linköping University