[gambit-list] ERROR IN ##parameterize

Marc Feeley feeley at iro.umontreal.ca
Mon Oct 2 13:11:31 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2-Oct-06, at 12:12 PM, Blake McBride wrote:

>
> 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.
>

Including Gambit!  Just read the Gambit-C manual page 21.  The  
default installation directory is /usr/local/Gambit-C/VERSION, but  
this can be changed at build time.  The environment variable that  
Gambit uses is called GAMBCOPT and it contains the runtime options  
that override the options that were used when the system was built.   
The runtime options on the command line (-:XXX) override the  
GAMBCOPT.  In other words the value of a runtime option will be equal to

1) the value used at system build time
2) UNLESS the option is overriden by the GAMBCOPT environment variable
3) UNLESS the option is overriden by the -:XXX runtime option on the  
command line

Here's an example with Unix:

$ gsi -e '(pp (path-expand "~~"))'
"/Users/feeley/Gambit-C/4.0b19/"
$ export GAMBCOPT=d0,=/Users/feeley/foo
$ gsi -e '(pp (path-expand "~~"))'
"/Users/feeley/foo/"
$ gsi -:=/Users/feeley/gambit -e '(pp (path-expand "~~"))'
"/Users/feeley/gambit/"

With the GAMBCOPT approach you can change more than the Gambit  
installation directory.  You can select the debugging level, the  
default file I/O encoding, etc.

>> 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.

It is good to have an indirection through a script so that the user  
has the last word on how the C compiler is called (C compiler  
options, special paths, tracing, etc).

Marc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFIUhD//V9Zc2T/v4RAkdeAJ9m+erW+vaOg7uZWA15VKbwWnPfIQCgqY6l
wn7xNu8uLE6bJ9jMyELBwyI=
=s4VQ
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list