I'm trying to compile a C program to be called from the Prolog Foreign Function Interface. I'm doing some Dynamic Programming, which isn't exactly efficient in Prolog. However, when I try to compile my file, I get the following error:
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
(maybe you meant: __main)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/Developer/usr/bin/clang returned code 256
*** swipl-ld exit status 1
The C file is simply the example found here.
Does anybody know if there is a way to fix this?