作者:LookUp77 | 来源:互联网 | 2023-05-18 16:28
ImtryingtocompiletheNIFTestfromErlang(http:www.erlang.orgdocmanerl_nif.html)onMacO
I'm trying to compile the NIF Test from Erlang (http://www.erlang.org/doc/man/erl_nif.html) on Mac OS X Lion. I can't get it to compile. Am I missing a compiler flag? Here's the error I get:
我正在尝试从Erlang中编译NIF测试(http://www.erlang.org/doc/man/erl_nif.html)。我无法让它编译。我缺少一个编译器标志吗?这是我的错误:
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
I've also tried this with -m32
but it says there's no i386 architecture either.
我也尝试过使用-m32,但它说也没有i386架构。
Thanks!
谢谢!
3 个解决方案