<div dir="ltr">now i'm getting:<br><div>undefined symbol: _ZNSt8ios_base4InitD1Ev </div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 4, 2017 at 11:45 PM, Stanislaw Klekot <span dir="ltr"><<a href="mailto:erlang.org@jarowit.net" target="_blank">erlang.org@jarowit.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, Feb 04, 2017 at 11:25:33PM +0100, Karlo Kuna wrote:<br>
> i am using c++ to implement nif module<br>
> and i am using nifpp (<a href="https://github.com/goertzenator/nifpp" rel="noreferrer" target="_blank">https://github.com/<wbr>goertzenator/nifpp</a>)<br>
><br>
> now i can compile my project but on function call i get:<br>
><br>
> Failed to load NIF library: my.so undefined symbol:<br>
> _ZTVN10__cxxabiv117__class_<wbr>type_infoE<br>
><br>
> can someone give me a hint what is this error? is it linkage, or bad call,<br>
> or something else<br>
> and how go about solving it?<br>
<br>
</div></div>It's because of name mangling by C++ compiler (necessary thing for<br>
overloaded functions to work). It's a totally expected problem when<br>
you're writing in C++ a library that needs to be used by system written<br>
in C. You need to disable name mangling for your NIF function.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Stanislaw Klekot<br>
</font></span></blockquote></div><br></div>