CHICKEN with Windows
(Scroll down if seeing this in >=2021)
New chicken users under windows will notice that just downloading the binary chicken will NOT get them a working csc; chicken and csi work fine, but csc needs a c compiler. The default, if I am not mistaken, is the mingw compiler (Minimalist GNU for Windows), which is not hard to find. Just install the binary packages, probably with the installer. Next, make sure your chicken directory is in the root directory, aka C:\chicken\.
Now, edit the path; with xp, Control Panel > System (with classical configuration) > Advanced > Environmental Variables > (either edit or make the variable PATH in user or system variables; do it in system if you want everyone on the computer to see it). The path variable has the syntax path;path;path, with paths separated by semicolons. Tack on the C:\MinGW\bin\ directory, as well as the C:\chicken\bin\ directory (if you want to be able to type csc into your command line directly).
If you try running csc now, it'll fail miserably; before you become an abject failure, copy (or edit the path variable) the header files from chicken/include to MinGW/include, and the library files from chicken/lib to MinGW/lib. I don't think you have to copy the directories that were in either include or lib as of chicken 3.4. Now, typing csc -c filename.scm should pop out an executable.
NOTE: I don't think copying files from the chicken istallation is a good idea and adding the include and lib directories doesn't seem to work. I can get the compilation to work using the command "csc -IC:\chicken\include -LC:\chicken\lib filename.scm".
NOTE2: Setting CSC_OPTIONS as shown below, either from Environment Variables or from command prompt, allows you to invoke csc directly.
CSC_OPTIONS=-IC:\chicken\include -LC:\chicken\lib
There is also a -cc option to change the default compiler.
More about csi options can be found by entering "csi -help"
For more about csi see the http://wiki.call-cc.org/man/4/Using%20the%20compiler
===
That was the hard way. The easy way is to install mingw in the default location, add c:\mingw\bin to your PATH, download and extract the CHICKEN tarball, open a command-window, cd to the directory that contains the unpacked CHICKEN sources and enter.
c:\> mingw32-make PLATFORM=mingw PREFIX=c:/chicken c:\> mingw32-make PLATFORM=mingw PREFIX=c:/chicken install
If you encounter this error https://cygwin.com/ml/cygwin-apps/2014-12/msg00080.html, when compiling you should add the ARCH=x86-64 flag when building chicken.
c:\> mingw32-make PLATFORM=mingw ARCH=x86-64 PREFIX=c:/chicken c:\> mingw32-make PLATFORM=mingw ARCH=x86-64 PREFIX=c:/chicken install
Then add c:\chicken\bin to path variable and everything works fine and chicken is in its own directory.
==
TL;DR
- Install MinGW-w64 https://sourceforge.net/projects/mingw-w64/ .
- Select your architecture and select POSIX threads.
- Download latest release of chicken scheme, unpack it and move to that direcory with Powershell.
- Add to your PATH MinGW:
c:\> $env:PATH += ";C:\Program Files\mingw-w64\the-package-you-selected\mingw64\bin"
- Compile using mingw32-make as above described (classic make && make install)
c:\path\to\chicken-5.x.x> mingw32-make PLATFORM=mingw PREFIX=c:/chicken c:\path\to\chicken-5.x.x> mingw32-make PLATFORM=mingw PREFIX=c:/chicken install
- Add to your PATH the now installed version of Chicken Scheme:
c:\> $env:PATH += ";C:\chicken\bin"
- You are now ready to use chicken-install.exe csi.exe csc.exe (works fine with -static too).