[erlang-questions] how can I make nif shared libraries

Jachym Holecek freza@REDACTED
Wed Dec 22 22:38:39 CET 2010


# 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.)

Regards,
	-- Jachym


More information about the erlang-questions mailing list