SimpleServer under VS2010 not compiling

NatNet, VRPN, TrackD, and Plugins
Post Reply
zsero
Posts: 15
Joined: Thu Mar 03, 2011 5:05 pm

SimpleServer under VS2010 not compiling

Post 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?
zsero
Posts: 15
Joined: Thu Mar 03, 2011 5:05 pm

Re: SimpleServer under VS2010 not compiling

Post 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
Post Reply