[gambit-list] Newby question on compiling Gambit output
Guillaume Germain
germaing at iro.umontreal.ca
Tue Jul 11 11:58:47 EDT 2006
On Tue, 11 Jul 2006, Kenneth Kellum wrote:
> I'm running Windows XP. I downloaded Gambit-C, version 4.0 beta 9.
> I've succeeded in using Gambit to translate foo.scm into foo.c.
>
> After quite a while looking for documentation I'm still clueless as to
> how to compile and link foo.c. I've tried both MS Visual Studio and
> Watcom-1.3.
I'm not familiar with using Gambit under Windows, but the easiest way to
deal with compiled code with Gambit is to use dynamic libraries. For
example:
% gsc -dynamic foo.scm
... generates foo.o1
% gsi foo
... runs the compiled foo module
Using gcc, to generate a standalone executable you do something like:
% gsc foo.scm
... generates foo.c and foo_.c
% gcc -o foo foo.c foo_.c -lgambc -lm -ldl -lutil
... generates the foo executable
% ./foo
... runs foo
Hope that helps,
Guillaume
More information about the Gambit-list
mailing list