Search code examples
cwindowserlangcygwin

link erlang nif on windows


I try to compile a erlang nif plugin on windows using the cygwin gcc. It compiles fine but the linker issues some errors:

undefined reference to `_enif_get_int'

I'm currently linking against ei.lib and erl_interface.lib. None of these contain the required symbols. Did I miss something?


Solution

  • It looks rather like you have a windows module (which expects symbols starting with underscore) linking against cygwin libraries (which typically don't export symbols with underscore).