Problems with installing ofxOpenNI

Greetings fellow openframeworks users. I’m currently trying to install gameoverhack’s ofxOpenNI addon and I ran into some problems, I’m unable to solve. Here I’ll post the list of steps I took with the hope that someone can guide me through what I’m doing wrong.

First of all my setup is openFrameworks 0.8.4 and CodeBlocks 13.12 with MinGW.

So, what I did basically is:

1/ Unpack ofxOpenNI in the addons folder. The installation readme prompted me to install OpenNI, NiTE and Sensor Kinect drivers, but the links provided were not available. I’ve found binaries on codeplex site and NiTE2.2 on google drive link. I installed them and after following the ofxOpenNI installation guide to the end tried to

2/ Build an example. Unfortunately the build wasn’t successful and I got the following errors:

||=== Build: release in openNISample007 (compiler: GNU GCC Compiler) ===|
 ..\..\..\libs\poco\lib\win_cb\libPocoNetmt.a||No such file or directory|
 ..\..\..\libs\poco\lib\win_cb\libPocoUtilmt.a||No such file or directory|
 ..\..\..\libs\poco\lib\win_cb\libPocoXMLmt.a||No such file or directory|
 ..\..\..\libs\poco\lib\win_cb\libPocoFoundationmt.a||No such file or directory|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

In the poco folder such files exist, but without the “mt” suffix. I was unable to figure out how to make the compiler to point to the right set of files.

After reaching a dead end I tried to

3/ Build my own example using the Project Generator. After including additional search directories and building the solution I got the following set of errors:

||=== Build: release in openFrameworksLib (compiler: GNU GCC Compiler) ===|
||=== Build: release in OpenNIAddon (compiler: GNU GCC Compiler) ===|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp||In member function 'void ofxOpenNI::start()':|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp|160|warning: 'void ofThread::startThread(bool, bool)' is deprecated (declared at ..\..\..\libs\openFrameworks\utils/ofThread.h:94): Use startThread(bool blocking = true) instead. [-Wdeprecated-declarations]|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp||In member function 'void ofxOpenNI::setFrame(int)':|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp|602|warning: 'void ofThread::startThread(bool, bool)' is deprecated (declared at ..\..\..\libs\openFrameworks\utils/ofThread.h:94): Use startThread(bool blocking = true) instead. [-Wdeprecated-declarations]|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp||In member function 'void ofxOpenNI::nextFrame()':|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp|675|warning: 'void ofThread::startThread(bool, bool)' is deprecated (declared at ..\..\..\libs\openFrameworks\utils/ofThread.h:94): Use startThread(bool blocking = true) instead. [-Wdeprecated-declarations]|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp||In member function 'void ofxOpenNI::previousFrame()':|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp|691|warning: 'void ofThread::startThread(bool, bool)' is deprecated (declared at ..\..\..\libs\openFrameworks\utils/ofThread.h:94): Use startThread(bool blocking = true) instead. [-Wdeprecated-declarations]|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp||In member function 'bool ofxOpenNI::allocateHands()':|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp|1119|warning: passing NULL to non-pointer argument 3 of 'ofxOpenNIHandEvent::ofxOpenNIHandEvent(int, HandStatusType, XnUserID, ofPoint, ofPoint, int)' [-Wconversion-null]|
D:\Code\of_v0.8.4_win_cb_release\addons\ofxOpenNI\src\ofxOpenNI.cpp|3094|warning: passing NULL to non-pointer argument 3 of 'ofxOpenNIHandEvent::ofxOpenNIHandEvent(int, HandStatusType, XnUserID, ofPoint, ofPoint, int)' [-Wconversion-null]|
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetRefContextFromNodeHandle'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnContextUnregisterFromShutdown'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnContextRelease'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnProductionNodeRelease'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| more undefined references to `_imp__xnStopGenerating' follow|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnLogSetConsoleOutput'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnLogSetSeverityFilter'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnLogSetMaskState'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetFirst'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetNext'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetCurrentDescription'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnProductionNodeDescriptionToString'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetCurrentError'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnSetPlayerRepeat'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnSetPlaybackSpeed'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetPlaybackSpeed'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetNodeName'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnTellPlayerFrame'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetNodeName'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetPlayerNumFrames'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnIsPlayerAtEOF'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetDeviceMaxDepth'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnOSMalloc'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnRegisterGestureCallbacks'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnOSFree'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnSetSkeletonSmoothing'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetDeviceMaxDepth'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListAllocate'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerateExistingNodes'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListFree'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetFirst'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListFree'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListIteratorIsValid'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetCurrent'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoGetDescription'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoGetRefHandle'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnProductionNodeRelease'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetNext'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListIteratorIsValid'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetCurrent'|
obj\Release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoGetRefHandle'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 23 warning(s) (0 minute(s), 27 second(s)) ===|

I found similar error in this forum topic and the explanation there is:

And I tried to link OpenNI and NiTE libraries, installed in 1/ but that didn’t resolve the problem, so I guess I’m still not linking them correctly or these are not the libraries I’m looking for. :smile:

I have one more path to explore: in the installation guide of ofxOpenNI there are links to OpenNI and SensorKinect github, that require building on Visual Studio and Python (which I don’t have right now). I’ll try to build these libraries and link them into my solution.

Thank you for your time, any help will be greatly appreciated.
Cheers, Ivan Chomakov.

Hi @task4s,
the compiled libraries you’re using seem to be the wrong ones. Note that the NiTe version you posted is 2.2, yet this addon is for version 1.x
version 1 and 2 are not cross compatible.

Right now I only have the osx installers, otherwise I would share those.

Also, note that the files that you have to copy to your data folder are just used to make that process of manually linking easier or not needed, but the versions of the files you copied to the data folder must be the same as the ones you install. If you don’t have the same version you should manually link to the ones that the openni and nite installers installed.
I really don’t know where you could find those installers other than just try googling.

Finally, I recommend you to use ofxNI that uses version 2 of OpenNi and nite. The openni files are still up at https://github.com/OpenNI/OpenNI2 and it seems that you have NiTE 2.2. As for the drivers make sure you use the avin ones. Not only it will be easier to find the libs but also it is easier to use and it has more features that version 1.

Are you able to run the examples for the ofxKinect addon?
Why don’t you try the addons that use the microsoft SDK? Those seem to be actively developed and have seem to work a lot better that the openNi ones.

Best!
As far as I recall there might be some trouble in windows when you try to use openNi and

Greetings, @roymacdonald, thank you for your quick and thorough answer.

The codeplex link I’ve shared above has OpenNi and NiTe binaries version 1.x. The build logs I’ve posted are obtained while I was trying to link the addon to those two. When I ran into the build errors described, I decided to try with as many different versions of OpenNI and NiTe I can get my hands on (hence I tried with NiTe 2.2), but to no avail.

I had no problem running the ofxKinect examples, after swapping my windows kinect driver with libfreenect one. But I need the skeleton tracking and gesture recognition features of OpenNI and I didn’t see them provided in ofxKinect. If u happen to know any addons, wrapping around microsoft SDK and containing that functionality, please, share them with me, I’ll gladly try them out.

I’ll definitely give ofxNI a shot, thanks for the recommendation.

Cheers.

HI,
good to know it helped.
As for OpenNi, [ofxNi2][1] was the best implemented addon. I used it a lot.
It’s only problem right now has to do with finding the nite libs, as the opeNi ones are online on github.
I remember that there were some addons using the microsoft stuff.
Whats being actively developed are the addons for kinect v2 using the microsoft sdk.
Anyways, go to ofxaddons.com , you might find something useful there.

best
[1]: https://github.com/satoruhiga/ofxNI2

1 Like