Linking to NatNetLib with MinGW
Posted: Fri Nov 27, 2015 6:46 am
I'm cross-compiling an application for Windows from Ubuntu which is based off of the 'SampleClient' application from NatNet_SDK_2.9.
Unfortunately the MinGW cross-compiler can't link against the 'NatNetLib.dll' due to the c++ name-mangling which occurs. Is it possible to get a '.def' or a '.lib/.dll' combo which can be linked-against using MinGW?
build cmd:
i686-mingw32-g++ -o test.exe src/OptitrackClient.cpp -Llib -lNatNetLib
error example from linker fail:
undefined reference to `NatNetClient::SendMessageAndWait(char*, void**, int*)'
I've tried building with MinGW in windows as well with the same results. (Also tried linking against NatNetLibStatic.lib to no avail)
Unfortunately the MinGW cross-compiler can't link against the 'NatNetLib.dll' due to the c++ name-mangling which occurs. Is it possible to get a '.def' or a '.lib/.dll' combo which can be linked-against using MinGW?
build cmd:
i686-mingw32-g++ -o test.exe src/OptitrackClient.cpp -Llib -lNatNetLib
error example from linker fail:
undefined reference to `NatNetClient::SendMessageAndWait(char*, void**, int*)'
I've tried building with MinGW in windows as well with the same results. (Also tried linking against NatNetLibStatic.lib to no avail)