Error in NatNetTypes.h and SampleClient.cpp - NatNet SDK2.6

NatNet, VRPN, TrackD, and Plugins
Post Reply
eskam
Posts: 2
Joined: Wed Jun 04, 2014 8:00 am

Error in NatNetTypes.h and SampleClient.cpp - NatNet SDK2.6

Post by eskam »

Hi Optitrack team,

I was trying to incorporate SampleClient.cpp into my application and i ran into the following output error in vs2010 express edition.

1>src\SampleClient.cpp(172): error C2664: 'GetCurrentDirectoryW' : cannot convert parameter 2 from 'char [260]' to 'LPWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>src\SampleClient.cpp(319): error C2039: 'fTimestamp' : is not a member of 'sFrameOfMocapData'
1> c:\users\ekam01\desktop\qgc-win\src\NatNetTypes.h(229) : see declaration of 'sFrameOfMocapData'
1>src\SampleClient.cpp(323): error C2039: 'params' : is not a member of 'sFrameOfMocapData'
1> c:\users\ekam01\desktop\qgc-win\src\NatNetTypes.h(229) : see declaration of 'sFrameOfMocapData'
1>src\SampleClient.cpp(324): error C2039: 'params' : is not a member of 'sFrameOfMocapData'
1> c:\users\ekam01\desktop\qgc-win\src\NatNetTypes.h(229) : see declaration of 'sFrameOfMocapData'
1>src\SampleClient.cpp(356): error C2039: 'params' : is not a member of 'sRigidBodyData'
1> c:\users\ekam01\desktop\qgc-win\src\NatNetTypes.h(172) : see declaration of 'sRigidBodyData'
1>src\SampleClient.cpp(421): error C2039: 'params' : is not a member of 'sMarker'
1> c:\users\ekam01\desktop\qgc-win\src\NatNetTypes.h(135) : see declaration of 'sMarker'
1>src\SampleClient.cpp(422): error C2039: 'params' : is not a member of 'sMarker'
1> c:\users\ekam01\desktop\qgc-win\src\NatNetTypes.h(135) : see declaration of 'sMarker'
1>src\SampleClient.cpp(423): error C2039: 'params' : is not a member of 'sMarker'
1> c:\users\ekam01\desktop\qgc-win\src\NatNetTypes.h(135) : see declaration of 'sMarker'


I was able to resolve the first error by changing "char szFolder[MAX_PATH]"to "wchar_t szFolder[MAX_PATH]" but for the remaining errors, i am not too sure how i should rectify them or its ok for me to ignore them?

Seems to me these errors are caused by missing declaration in the NatNetTypes.h header file. Just want to check if it was intentionally left out or there is another header file to accompany SampleClient.ccp file in SDK2.6.

Please advise, thank you all so much

Rdgs,
E.S
morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 199
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: Error in NatNetTypes.h and SampleClient.cpp - NatNet SDK

Post by morgan »

The errors suggest an out of date NatNetTypes.h file.

Reviewing the NatNet 2.6 distro - NatNetTypes.h appears correct with the included declarations. Possible your project is referencing a previous version?

Morgan
Post Reply