[gambit-list] How to create small standalone executable with

Adrien Piérard pierarda at iro.umontreal.ca
Mon Aug 17 01:59:04 EDT 2009


2009/8/17 peter lo <peter19852001 at yahoo.com.hk>:
> Dear all,
>    I am new to Gambit-C. I keep hearing that with Gambit-C, it is easy to create small executable. But when I tried, a simple hello world program takes around 3 MB when compiled as a STANDALONE executable. Is there a way to create small executable which includes only used functions, just like in C, we don't link the whole library into the executable.
> Thanks.
> Peter

Hi Peter.

This is quite hard, because in Scheme, you may call a function which
does not appear in the source code.
For example, the code below uses the function "LOAD", but there is no
way you can forsee that…
This is not a problem of Gambit-C, it's a feature of Scheme (and other
languages with an EVAL function)

(define func "lo")
(define tion "ad")
(eval (list (string->symbol (string-append func tion)) "another-file.scm"))

P!

-- 
Français, English, 日本語, 한국어



More information about the Gambit-list mailing list