On 5/6/07, David St-Hilaire sthilaid@iro.umontreal.ca wrote:
Hi everyone!
I'm rather new to the scheme world so that, so far, I've only needed to use a scheme interpreter to do the work I needed to get done. But now, I would be interested to build executable code from my scheme code. I've looked the example provided in the gambit documentation, but unfortunately, it does not work on my system (fedora core 6 laptop).
The default behavior of gsc is to create a compiled shared object that can be loaded using (load "m1"). If you want to compile the scheme code into a full executable, use the -link option and it will output the needed linking files for gcc to compile it.
$ gsc -link m1.scm m2.scm m3.scm
Will output m1.c, m1_.c (this is the linker file), etc., and then
$ gcc m1*.c m2*.c m3*.c -lgambc
(with other possible options) will be able to find all those undefined symbols.