我正在尝试在 Mac OS X Lion 上编译来自 Erlang ( http://www.erlang.org/doc/man/erl_nif.html ) 的 NIF 测试。我无法编译它。我是否缺少编译器标志?这是我得到的错误:
Computer:~ me $ gcc -fPIC -shared -o niftest.so niftest.c -I /usr/local/Cellar/erlang/R14B02/lib/erlang/usr/include/
Undefined symbols for architecture x86_64:
"_enif_make_string", referenced from:
_hello in ccXfh0oG.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
我也试过这个,-m32
但它说也没有 i386 架构。
谢谢!