i thought if i include the -I and -L options there's no need for the -lgambc.
anyway, it works now! gcc hello.c -I/usr/local/Gambit-C/include -L/usr/local/Gambit-C/lib -lgambc ./a.out hello world!
thanks ivan
antonitio
On Wed, Aug 26, 2009 at 12:30 AM, Ivan Kelly ivan@bleurgh.com wrote:
You missed the library, -lgambc
-Ivan
On Wed, Aug 26, 2009 at 12:15:28AM +0800, antonitio wrote:
hi,
i'm trying to compile scheme to c code.
here's the hello.scm code: (display "hello world") (newline)
compiled ok with gsc: /usr/local/Gambit-C/bin/gsc -c hello.scm
however when tried to compile with gcc produced the following error: gcc test.c -I/usr/local/Gambit-C/include -L/usr/local/Gambit-C/lib Undefined symbols: "____gstate", referenced from: ____gstate$non_lazy_ptr in cccK2CZQ.o "_main", referenced from: start in crt1.10.5.o "____G__20_test", referenced from: ____G__20_test$non_lazy_ptr in cccK2CZQ.o "____G_display", referenced from: ____G_display$non_lazy_ptr in cccK2CZQ.o "____G_newline", referenced from: ____G_newline$non_lazy_ptr in cccK2CZQ.o ld: symbol(s) not found collect2: ld returned 1 exit status
i'm running on mac os x: uname -srmp; gcc --version Darwin 9.8.0 i386 i386 i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
did i miss some settings or steps?
thanks,
antonitio
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list