[erlang-questions] Error from on_load function of NIF module
Thu Jan 7 18:29:33 CET 2016
On 01/07/2016 04:50 PM, Abhishek Singh wrote:
> I was able to overcome this error by copying macro statements from
> below link:
#if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
#elif defined __GNUC__
> Not sure what exactly it does, would be useful if somebody could throw
> some light on it.
My guess is the .so file is linked with option -fvisibility=hidden
which according to the gcc man page "...can very substantially improve
linking and load times of shared object libraries, produce more
provide near-perfect API export and prevent symbol clashes".
That is, all symbols are made hidden by default and the above macro cludge
makes an exception for the "nif_init" function that needs to be visible.
I will see if I can incorporate that into the ERL_NIF_INIT macro.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions