[gambit-list] Newby question on compiling Gambit output

Kenneth Kellum kellum at math.sjsu.edu
Tue Jul 11 19:27:56 EDT 2006


Thanks:

I downloaded beta 17, but thus far haven't been able to build Gambit-C.

I looked at the openwatcom.bat file.  I changed
@SET WATCOM=C:\WATCOM to @SET WATCOM=C:\WATCOM-1.3.

I ran openwatcom in a Command prompt window.  It ran for a bit, but then 
gave a bunch of errors starting with

Error!  E2008:  cannot open ..\lib\main.obj : No such file or directory

I also tried changing the watcom director name, but got the same errors.

I've tried Cygwin with no more success.

I'm stuck.


Marc Feeley wrote:
> First of all beta 9 is quite old and it has a few known bugs on  
> Windows.  You should use beta 17.
> 
> After a "./configure" and a "make" and a "make install", Gambit-C  
> will be installed in:
> 
>     c:/msys/1.0/local/Gambit-C
> 
> Then you can compile a standalone program like this:
> 
> 
> feeley at NEO-XP ~/gambc40b17
> $ cat foo.scm
> (display "hello world\n")
> 
> feeley at NEO-XP ~/gambc40b17
> $ c:/msys/1.0/local/Gambit-C/bin/gsc foo.scm
> 
> feeley at NEO-XP ~/gambc40b17
> $ gcc -I c:/msys/1.0/local/Gambit-C/include foo.c foo_.c c:/msys/1.0/ 
> local/Gambit-C/lib/libgambc.a -lws2_32
> 
> feeley at NEO-XP ~/gambc40b17
> $ a.exe -:tc
> hello world
> 
> 
> Of course you can put c:/msys/1.0/local/Gambit-C/bin in your PATH to  
> access gsi and gsc easier.
> 
> As Guillaume Germain mentioned it is probably easier to compile your  
> program dynamically and load it using the interpreter:
> 
> 
> feeley at NEO-XP ~/gambc40b17
> $ c:/msys/1.0/local/Gambit-C/bin/gsc -dynamic foo.scm
> 
> feeley at NEO-XP ~/gambc40b17
> $ c:/msys/1.0/local/Gambit-C/bin/gsi -:tc foo
> hello world
> 
> 
> Note that the -:tc option is a temporary work around for a bug on  
> Windows.
> 
> Marc
> 
> 
> On 11-Jul-06, at 9:57 AM, Kenneth Kellum wrote:
> 
>> If this is a FAQ, sorry.
>>
>> I'm trying to use Gambit-C to get an executable version of a Scheme
>> program.  I'm comfortable with Scheme, but haven't used C in many  
>> years.
>>
>> 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.
>>
>> Any help will be greatly appreciated.
>> _______________________________________________
>> Gambit-list mailing list
>> Gambit-list at iro.umontreal.ca
>> http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list
> 
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list




More information about the Gambit-list mailing list