Hi all,
I used gameoverhack’s ofxOpenNI(https://github.com/gameoverhack/ofxOpenNI) to develop my project.
As to acquire the RaiseHand gesture’s position info., I add two static member variables(hitPos & hit) and two public member functions(gethit()&resethit()) in ofxOpenNI.h and ofxOpenNI.cpp, then use these member variables in callback function ofxOpenNI::GestureCB_handleGestureRecognized() as well as these two public member functions, the compilation is successfully, but linking stage is always got error messages as follows:
…
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to ofxOpenNI::hitPos'| obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to
ofxOpenNI::hitPos’|
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to ofxOpenNI::hitPos'| obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to
ofxOpenNI::hit’|
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to ofxOpenNI::hit'| obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to
ofxOpenNI::hit’|
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to ofxOpenNI::hitPos'| obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to
ofxOpenNI::hitPos’|
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `ofxOpenNI::hitPos’|
||=== Build finished: 9 errors, 19 warnings (0 minutes, 25 seconds) ===
Does anyone have any idea to help solve this? thank a lot!