12 Jul
2021
12 Jul
'21
19:57
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