i thought if i include the -I and -L options<br>there's no need for the -lgambc.<br><br>anyway, it works now!<br>gcc hello.c -I/usr/local/Gambit-C/include -L/usr/local/Gambit-C/lib -lgambc<br>./a.out <br>hello world!<br>
<br>thanks ivan<br><br>antonitio<br><br><br><div class="gmail_quote">On Wed, Aug 26, 2009 at 12:30 AM, Ivan Kelly <span dir="ltr"><<a href="mailto:ivan@bleurgh.com">ivan@bleurgh.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You missed the library, -lgambc<br>
<br>
-Ivan<br>
<div><div></div><div class="h5"><br>
On Wed, Aug 26, 2009 at 12:15:28AM +0800, antonitio wrote:<br>
> hi,<br>
><br>
> i'm trying to compile scheme to c code.<br>
><br>
> here's the hello.scm code:<br>
> (display "hello world")<br>
> (newline)<br>
><br>
> compiled ok with gsc:<br>
> /usr/local/Gambit-C/bin/gsc -c hello.scm<br>
><br>
> however when tried to compile with gcc produced the following error:<br>
> gcc test.c -I/usr/local/Gambit-C/include -L/usr/local/Gambit-C/lib<br>
> Undefined symbols:<br>
>   "____gstate", referenced from:<br>
>       ____gstate$non_lazy_ptr in cccK2CZQ.o<br>
>   "_main", referenced from:<br>
>       start in crt1.10.5.o<br>
>   "____G__20_test", referenced from:<br>
>       ____G__20_test$non_lazy_ptr in cccK2CZQ.o<br>
>   "____G_display", referenced from:<br>
>       ____G_display$non_lazy_ptr in cccK2CZQ.o<br>
>   "____G_newline", referenced from:<br>
>       ____G_newline$non_lazy_ptr in cccK2CZQ.o<br>
> ld: symbol(s) not found<br>
> collect2: ld returned 1 exit status<br>
><br>
> i'm running on mac os x:<br>
> uname -srmp; gcc --version<br>
> Darwin 9.8.0 i386 i386<br>
> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)<br>
><br>
> did i miss some settings or steps?<br>
><br>
> thanks,<br>
><br>
> antonitio<br>
<br>
</div></div>> _______________________________________________<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>
<br>
</blockquote></div><br>