[gambit-list] Calling Gambit Scheme functions from C
Sonny To
son.c.to at gmail.com
Mon Jul 12 15:57:48 EDT 2021
Hi,
Found an example of calling Scheme functions from C but cannot compile it
https://gist.github.com/ncweinhold/991905
% gsc -c somescheme.scm
% gsc -link somescheme.c
% gsc -obj somescheme.c main.c somescheme_.c
% gcc somescheme.o somescheme_.o main.o -I$GAMBIT/include
$GAMBIT/lib/libgambit.a -lm -ldl -lutil -lssl -lcrypto
ld: error: duplicate symbol: main
>>> defined at somescheme_.c
>>> somescheme_.o:(main)
>>> defined at main.c
>>> main.o:(.text+0x0)
collect2: error: ld returned 1 exit status
How to prevent the main function generation in somescheme_.c ?
Many thanks for any help.
-Sonny
More information about the Gambit-list
mailing list