[erlang-questions] NIFS

Karlo Kuna kuna.prime@REDACTED
Sun Feb 5 06:48:08 CET 2017


now i'm getting:
undefined symbol: _ZNSt8ios_base4InitD1Ev



On Sat, Feb 4, 2017 at 11:45 PM, Stanislaw Klekot <erlang.org@REDACTED>
wrote:

> 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:
> > _ZTVN10__cxxabiv117__class_type_infoE
> >
> > 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.
>
> --
> Stanislaw Klekot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170205/744e04fd/attachment.htm>


More information about the erlang-questions mailing list