[gambit-list] How can built a small as 5 Kbytes "Hello World" program ?

Marc Feeley feeley at iro.umontreal.ca
Sun Jan 18 23:51:47 EST 2015


You need to configure Gambit using --enable-shared, i.e.

  ./configure --enable-single-host --enable-shared
  make

This will build a DLL for the Gambit runtime library, so that the .exe doesn’t contain the runtime library.

Marc

> On Jan 18, 2015, at 9:54 PM, Ryuho Yokoyama <ryuho8 at ybb.ne.jp> wrote:
> 
> I built a "Hello World" program as follows,
>  
> >type h.scm
> (display "Hello ")
> >type w.scm
> (display "World")
> >gsc -link h w
> >gsc -obj h.c w.c w_.c
> >gcc -o w.exe h.o w.o w_.o C:/Gambit-C_64bit/v4.7.3/lib/libgambc.a -lws2_32
> >w.exe
> Hello World
> >
>  
> This way, the size of the "w.exe" is 4.61MB.
>  
> In Gambit-C manual documents
> 3. The Gambit Scheme compiler
>   3.4 Link files
>      ... A "Hello World" program built this way can be as small as 5 Kbytes. ...
>  
> Could you please teach me how to built program as small as 5 Kbytes one.
>  
> Thanks in advance.
>  
>  
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4839 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150118/4e7cd59f/attachment.bin>


More information about the Gambit-list mailing list