You can also compile a.ss b.ss main.ss separately into object files, and link them together into one executable file. In this case you leave any load or include out of either of the files.<br><br><div class="gmail_quote">2011/11/12 Adrien Piérard <span dir="ltr"><<a href="mailto:pierarda@iro.umontreal.ca">pierarda@iro.umontreal.ca</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> I have a Scheme file that loads some dependencies:<br>
>    ;; main.ss<br>
>    (load "a.ss")<br>
>    (load "b.ss")<br>
>    (define (main)<br>
>       (call-procs-in-a-and-b))<br>
>    (main)<br>
> I generate an executable like this<br>
>    $ gsc -o myapp -exe main.ss<br>
> When I run `myapp`, it is still looking for `a.ss` and `b.ss`.<br>
> How can I make sure that these files also get compiled and linked to<br>
> the executable?<br>
> Do I have to compile them separately?<br>
<br>
</div>LOAD is called at runtime, it is thus normal that it looks for those<br>
files after you compiled.<br>
You can try INCLUDE instead, which is a macro and should textually put<br>
the contents of a.ss and b.ss in main.ss before compilation.<br>
You could also<br>
 gsc a.scm<br>
 gsc b.scm<br>
to compile the two files, then just do (load "a") and (load "b")<br>
without the extension in main.scm, and finally<br>
 gsc -exe main.scm<br>
Then, your binary main will load at run time the compiled binaries<br>
a.o1 and b.o1.<br>
<br>
<br>
Cheers,<br>
<br>
P!<br>
<font color="#888888">--<br>
Français, English, 日本語, 한국어<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</div></div></blockquote></div><br>