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