Page 1 of 1

SimpleServer under VS2010 not compiling

Posted: Fri Oct 19, 2012 7:12 pm
by zsero
Is there anyone who was able to compile SimpleServer under VS2010?

Because it was built with an older version of Visual Studio, I always get this problem when static linking:

Code: Select all

NatNetLibStatic.lib(unicastservercore.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ)
NatNetLibStatic.lib(unicastservercore.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ)
Is there a (beta) version of NatNet SDK what is compiled for VS2010?

Is this problem fixed by using dynamic linking? If yes, can you tell me how to do dynamic linking?

Re: SimpleServer under VS2010 not compiling

Posted: Fri Oct 19, 2012 7:57 pm
by zsero
OK, I could make it work with dynamic linking.

I had to do the following:
1. Insert "#define NATNETLIB_IMPORTS" at the start of the file (after #pragma)

2. Link with NatNetLib.lib instead of NatNetLibStatic.lib

3. Link with wsock32.lib and Winmm.lib as well