Sat Feb 4 23:45:16 CET 2017
On Sat, Feb 04, 2017 at 11:25:33PM +0100, Karlo Kuna wrote:
> i am using c++ to implement nif module
> and i am using nifpp (https://github.com/goertzenator/nifpp)
> now i can compile my project but on function call i get:
> Failed to load NIF library: my.so undefined symbol:
> can someone give me a hint what is this error? is it linkage, or bad call,
> or something else
> and how go about solving it?
It's because of name mangling by C++ compiler (necessary thing for
overloaded functions to work). It's a totally expected problem when
you're writing in C++ a library that needs to be used by system written
in C. You need to disable name mangling for your NIF function.
More information about the erlang-questions