[erlang-questions] compiling linked-in driver on Mac OSX
Jacob Vorreuter
jacob.vorreuter@REDACTED
Sat May 29 22:30:44 CEST 2010
Ah, i386 I guess. I tried that before but didn't format the error to see that my C code is just broken. Thanks Max!
$ file erlexec
erlexec: Mach-O executable i386
$ gcc -o example_drv.so example_drv.c -arch i386 -fPIC -bundle -flat_namespace -undefined suppress -I/usr/local/lib/erlang/erts-5.7.5/include/
Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.7.5 (abort with ^G)
1> erl_ddll:load(".", "example_drv").
{error,{open_error,-10}}
2> erl_ddll:format_error({open_error,-10}).
"dlopen(./example_drv.so, 2): Symbol not found: _bar\n Referenced from: /Users/jkvor/dev/basic_driver/c/example_drv.so\n Expected in: flat namespace\n in /Users/jkvor/dev/basic_driver/c/example_drv.so"
On May 29, 2010, at 1:25 PM, Max Lapshin wrote:
> maxbp:~ max$ file
> /usr/local/Cellar/erlang/R13B04/lib/erlang/erts-5.7.5/bin/erlexec
> /usr/local/Cellar/erlang/R13B04/lib/erlang/erts-5.7.5/bin/erlexec:
> Mach-O 64-bit executable x86_64
>
>
> which architectures do you have?
More information about the erlang-questions
mailing list