source: project/wiki/compiling-chicken-on-windows-xp-with-mingw @ 36676

Last change on this file since 36676 was 32915, checked in by svnwiki, 4 years ago

Anonymous wiki edit for IP [167.107.191.217]: I found an error compiling chicken in windows, I got around it using the ARCH flag

  • Property svnwiki:tags set to mingw windows xp
File size: 2.7 KB
Line 
1== CHICKEN with Windows
2
3New 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\.
4
5Now, 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).
6
7If 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.
8
9NOTE: 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".
10
11NOTE2: Setting CSC_OPTIONS as shown below, either from Environment Variables or from command prompt, allows you to invoke csc directly.
12
13  CSC_OPTIONS=-IC:\chicken\include -LC:\chicken\lib
14
15
16There is also a -cc option to change the default compiler.
17
18More about csi options can be found by entering "csi -help"
19
20For more about csi see the http://wiki.call-cc.org/man/4/Using%20the%20compiler
21
22===
23
24That was the hard way. The easy way is to install mingw in the default location,
25add {{c:\mingw\bin}} to your {{PATH}}, download and extract the CHICKEN tarball,
26open a command-window, {{cd}} to the directory that contains the unpacked CHICKEN
27sources and enter.
28
29  c:\> mingw32-make PLATFORM=mingw PREFIX=c:/chicken
30  c:\> mingw32-make PLATFORM=mingw PREFIX=c:/chicken install
31
32If 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.
33
34  c:\> mingw32-make PLATFORM=mingw ARCH=x86-64 PREFIX=c:/chicken
35  c:\> mingw32-make PLATFORM=mingw ARCH=x86-64 PREFIX=c:/chicken install
36
37
38Then add c:\chicken\bin to path variable and everything works fine and chicken is in its own directory.
Note: See TracBrowser for help on using the repository browser.