<html>
<body>
<font size=3>At 09:26 AM 10/2/2006, Marc Feeley wrote:<br><br>
<blockquote type=cite class=cite cite="">On 2-Oct-06, at 1:10 AM, Blake
McBride wrote:<br><br>
<blockquote type=cite class=cite cite="">Greetings,<br><br>
I want to build a stand-alone (requiring no DLL's) scheme app<br>
under Windows.  I re-built Gambit 4.0b19 with Microsoft VC<br>
without a problem.  However, when I try to compile a trivial<br>
program I get:<br><br>
C:\Systems\Scheme\Gambit>gsc a.scm<br>
*** ERROR IN ##parameterize -- No such file or directory<br>
(current-directory "C:\\lib")<br><br>
C:\Systems\Scheme\Gambit>gsc -dynamic a.scm<br>
*** ERROR IN ##parameterize -- No such file or directory<br>
(current-directory "C:\\bin")<br>
</blockquote><br>
When you build Gambit-C you must indicate where it will be
installed  <br>
by setting the ___GAMBCDIR symbol.  With gcc this can be done
with:<br><br>
gcc -D___GAMBCDIR=\"C:/Gambit-C/4.0b19\" ...<br><br>
Just do the equivalent thing in VC.<br><br>
Note also that when you run gsc and gsi, you can force the Gambit 
<br>
installation directory with the -:=DIR runtime option.  So you could
do:<br><br>
gsc -:=C:/Gambit-C/4.0b19 a.scm</font></blockquote><br>
That worked and I did get a good executable file.  I had to link
with<br>
gambc.lib, user32.lib and ws2_32.lib (two MS libs).<br><br>
I don't get the whole "compile in the destination path"
stuff.  That<br>
means you have to re-build the whole thing whenever you want<br>
to move anything (like to a drive with more space).  It also
makes<br>
distributing Gambit a real pain (use my path or else...).<br>
Why don't you build with a default path and then use an environment<br>
variable to specify the Gambit home?  That's how everyone else<br>
does it.<br><br>
I'd leave in the -:= ability in case someone doesn't want to use an
environment<br>
variable and just wants to specify the home on the command line. 
But<br>
allowing the use of an environment variable is a real
convenience.<br><br>
The makefile I am using is as follows:<br><br>
<br>
GSHOME = /Gambit-C/4.0b19<br><br>
a.exe : a.scm<br>
<x-tab>        </x-tab>gsc
-:=$(GSHOME) a.scm<br>
<x-tab>        </x-tab>cl -nologo
-c -MTd -I$(GSHOME)\include a.c a_.c<br>
<x-tab>        </x-tab>link
/nologo /out:a.exe /libpath:$(GSHOME)\lib  a.obj a_.obj gambc.lib
user32.lib ws2_32.lib<br><br>
clean:<br>
<x-tab>        </x-tab>rm -zq *.c
*.obj *.exe *~ *.bak<br><br>
<br><br>
<br>
<blockquote type=cite class=cite cite="">
<blockquote type=cite class=cite cite=""><font size=3>a.scm just
contains:  (display "hello world")<br><br>
I tried the -verbose option and that gave me nothing useful.<br>
It would be unbelievably great if the -verbose option displayed<br>
the full compile and link commands it was running.<br><br>
I have no idea what that error message is trying to tell me.<br>
I tried all sorts of -cc-options and -ld-option options with no<br>
luck.  Without a display of what it's executing, I'm in the
dark.</blockquote><br>
I'll see what I can do.  Note that it is the gsc-cc-o.bat script
that  <br>
invokes the C compiler.  This file should be in<br><br>
C:/Gambit-C/4.0b19/bin/gsc-cc-o.bat<br><br>
You could add a trace in that script to echo the command that
invokes  <br>
the C compiler.</font></blockquote><br>
I didn't realize that GSC didn't drive the compile/link phase.<br><br>
Blake McBride<br>
</body>
</html>