[erlang-questions] how can I make nif shared libraries
Thu Dec 23 01:40:58 CET 2010
Le 22 déc. 2010 à 22:38, Jachym Holecek a écrit :
> # Tony Rogvall 2010-12-22:
>> To compile for multiple architectures on mac-os-x I use the flags
>> -arch i386 -arch x86_64
>> instead of -m32.
>> This makes it possible to use the driver or nif shared object with both 32- or 64-bit erlang.
>> To link with other shared libraries you need to add
>> -L<path> -l<name>
> For completeness add "-Wl,-R<path>" to the above. (This is probably obvious
> to most people on this list, and certainly to anybody on the OTP team, but
> it's surprising how many people out there have trouble understanding what is
> runtime link path good for.)
> -- Jachym
-Wl,-R<path> is not understood by Apple's linker, library paths are stored in the shared objects themselves, see install_name_tool(1).
More information about the erlang-questions