I would like to compile Gambit programs on Windows. I have installed a minimum gcc, that I use to compile Lisp, Maxima, Bigloo, Stalin, and other languages that compile through C. I tried to compile Gambit programs, to no avail. Here is what I have done:
gsc test.scm
This generates the file test.o1, that I can load from the interpreter. However, I cannot use interpreted code (or large distribution files, btw) for assignments. The nex thing I tried was...
gsc -link test.scm
This gives me test.c test_.c. The manual says that I should compile these files, but do not tell how to do it for Windows (there are examples for Mac OS-X, and Linux). I tried:
gcc -lgambc -lm test.c test_.c
I get a large number of errors, and that is all.
--------------------------------- Ask a question on any topic and get answers from real people. Go to Yahoo! Answers.
Afficher les réponses par date
Philippos Apolinarius wrote:
I would like to compile Gambit programs on Windows. I have installed a minimum gcc, that I use to compile Lisp, Maxima, Bigloo, Stalin, and other languages that compile through C. I tried to compile Gambit programs, to no avail. Here is what I have done:
gsc test.scm
This generates the file test.o1, that I can load from the interpreter. However, I cannot use interpreted code (or large distribution files, btw) for assignments.
test.o1 is *not* interpreted. It is compiled. (In case you don't believe me, run objdump -d test.o1.) Do not confuse this with loading compiled code by making use of the interpreter (through the repl).
Maybe that still isn't acceptable for your assignments, but at least you know from this that gcc is in fact working.
If the assignment rules are * enough to both forbid delivering a runtime (the Gambit runtime) separately and to ask for files smaller than the Gambit runtime, you'll be out of luck. (Well you could then check the mailing list archives for how the Gambit runtime has been made smaller for making the Nintendo DS port.)
The nex thing I tried was...
gsc -link test.scm
This gives me test.c test_.c. The manual says that I should compile these files, but do not tell how to do it for Windows (there are examples for Mac OS-X, and Linux). I tried:
gcc -lgambc -lm test.c test_.c
I get a large number of errors, and that is all.
I'm not using Windows myself, but why did you omit the most interesting part, the error message itself?
Christian.
Hallo,
Philippos Apolinarius wrote:
This gives me test.c test_.c. The manual says that I should compile these files, but do not tell how to do it for Windows (there are examples for Mac OS-X, and Linux). I tried:
gcc -lgambc -lm test.c test_.c
I get a large number of errors, and that is all.
You compilations errors are probably due to a missing gambit.h, and the linker errors due to a missing libgambc.a. You should add the directory where those files are to the search path of the compiler:
gcc -Ic:\Gambit-C\v4.2.5\include test.c test_.c -Lc:\Gambit-C\v4.2.5\lib -lgambc
-alex
On 28-Mar-08, at 1:42 AM, Philippos Apolinarius wrote:
I would like to compile Gambit programs on Windows. I have installed a minimum gcc, that I use to compile Lisp, Maxima, Bigloo, Stalin, and other languages that compile through C. I tried to compile Gambit programs, to no avail. Here is what I have done:
gsc test.scm
This generates the file test.o1, that I can load from the interpreter. However, I cannot use interpreted code (or large distribution files, btw) for assignments. The nex thing I tried was...
gsc -link test.scm
This gives me test.c test_.c. The manual says that I should compile these files, but do not tell how to do it for Windows (there are examples for Mac OS-X, and Linux). I tried:
gcc -lgambc -lm test.c test_.c
I get a large number of errors, and that is all.
On Windows, this should work (tested with MinGW):
% gsc -link test.scm % gcc -IC:/PROGRA~1/Gambit-C/v4.2.5/include -LC:/PROGRA~1/Gambit-C/ v4.2.5/lib -D___SINGLE_HOST test.c test_.c -lgambc -lws2_32 -o test.exe % test.exe
Marc