c - Can't link in libnanomsg for Windows MinGW, cross compiling using MXE -
i trying build nanomsg on mingw, cross compiling ubuntu using mxe. target host x86_64. built fine won't link. getting issues like
undefined reference 'imp__nn_freemsg'
i think it's static lib issue. built again using
./configure --enable-static --disable-shared ...
same issue. there linker flags need put in gcc build line after link in libnanomsg.a?
there many defines set if build vs, using cmake. located in src/nn.h, others scattered around. way, 'imp__**' issue failure link statically.
passing these flags link it:
-d_win32 -dnn_exports -dnn_have_mingw -dnn_have_windows -dnn_use_literal_ifaddr=1 -dstaticlib
Comments
Post a Comment