[plt-scheme] Separate compilation

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jun 21 14:06:27 EDT 2004

At Fri, 11 Jun 2004 15:33:51 +0200, Jens_Axel_Søgaard wrote:
>    [soegaard at commander plt]$ mzc --link-extension compile-time.kp compile-
> time.o constants.kp
>    constants.o trig.kp trig.o roots.kp roots.o misc.kp misc.o main.kp main.o
> 
>    MzScheme compiler (mzc) version 205, Copyright (c) 1996-2003 PLT
>    "/home/soegaard/macros-and-modules/plt/_loader.c":
>     [output to "/home/soegaard/macros-and-modules/plt/_loader.so"]
> 
>    [soegaard at commander plt]$ mzscheme
>    Welcome to MzScheme version 205, Copyright (c) 1995-2003 PLT
>    > (load/use-compiled "main.scm")
>    > (require main)          ; <- Is this using compiled version?

No, it's not using the compiled version. The `(require
"constants.scm")' in "main.scm" is resolved when the module is
executed, no matter how the module is compiled. And the only candidate
found for "constants.scm" is the source.

If you use the --auto-dir flag with mzc, then it will put "_loader.so" in
the right place so that `(require "main.scm")' will use "_loader.so", and
`(require "constants.scm")' will also use "_loader.so", and so on.

Matthew



Posted on the users mailing list.