我正在尝试编译要从 Prolog 外部函数接口调用的 C 程序。我正在做一些动态编程,这在 Prolog 中并不完全有效。但是,当我尝试编译文件时,出现以下错误:
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
C 文件就是此处找到的示例。
有谁知道是否有办法解决这个问题?