Solved: Error compiling ofxKinect example

I am trying to use the ofxKinect library with OF but I can’t get the example to compile.
I using Ubuntu 10.04, Codeblocks 8.02, OpenFrameworks 0.062 and the latest version ofxKinect from the github ‘master’ branch.

Any help would be appreciated. I’m sure it’s a simple fault on my part (I’m new to OpenFrameworks and C++).

The output from the debugger is below…

  
  
-------------- Build: Debug in kinectExample ---------------  
  
Compiling: src/main.cpp  
Compiling: src/ofxKinect/src/ofxKinect.cpp  
Compiling: src/testApp.cpp  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/testApp.cpp: In member function ‘void testApp::drawPointCloud()’:  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/testApp.cpp:113: warning: unused variable ‘distancePixels’  
Linking console executable: bin/kinectExample_debug  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:10: undefined reference to `ofxKinectCalibration::ofxKinectCalibration()'  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:35: undefined reference to `ofxKinectCalibration::~ofxKinectCalibration()'  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:10: undefined reference to `ofxKinectCalibration::ofxKinectCalibration()'  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:35: undefined reference to `ofxKinectCalibration::~ofxKinectCalibration()'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `~ofxKinect':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:41: undefined reference to `ofxKinectCalibration::~ofxKinectCalibration()'  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:41: undefined reference to `ofxKinectCalibration::~ofxKinectCalibration()'  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:41: undefined reference to `ofxKinectCalibration::~ofxKinectCalibration()'  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:41: undefined reference to `ofxKinectCalibration::~ofxKinectCalibration()'  
obj/Debug/src/ofxKinect/src/ofxKinect.o:/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:41: more undefined references to `ofxKinectCalibration::~ofxKinectCalibration()' follow  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getDepthPixels()':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:55: undefined reference to `ofxKinectCalibration::getDepthPixels()'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getDistancePixels()':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:65: undefined reference to `ofxKinectCalibration::getDistancePixels()'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getCalibratedRGBPixels()':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:70: undefined reference to `ofxKinectCalibration::getCalibratedRGBPixels(unsigned char*)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::init(bool, bool)':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:168: undefined reference to `ofxKinectCalibration::init(int)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::clear()':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:225: undefined reference to `ofxKinectCalibration::clear()'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::update()':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:246: undefined reference to `ofxKinectCalibration::update(unsigned short*)'  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:257: undefined reference to `ofxKinectCalibration::getDepthPixels()'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getDistanceAt(int, int)':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:266: undefined reference to `ofxKinectCalibration::getDistanceAt(int, int)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getDistanceAt(ofPoint const&)':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:271: undefined reference to `ofxKinectCalibration::getDistanceAt(ofPoint const&)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getWorldCoordinateFor(int, int)':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:276: undefined reference to `ofxKinectCalibration::getWorldCoordinateFor(int, int)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getCalibratedColorAt(int, int)':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:299: undefined reference to `ofxKinectCalibration::getCalibratedColorCoordAt(int, int)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::getCalibratedColorAt(ofPoint const&)':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:304: undefined reference to `ofxKinectCalibration::getCalibratedColorCoordAt(ofPoint const&)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::enableDepthNearValueWhite(bool)':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:379: undefined reference to `ofxKinectCalibration::enableDepthNearValueWhite(bool)'  
obj/Debug/src/ofxKinect/src/ofxKinect.o: In function `ofxKinect::isDepthNearValueWhite()':  
/home/-/of_preRelease_v0062_linux_FAT/addons/ofxKinect/example/src/ofxKinect/src/ofxKinect.cpp:384: undefined reference to `ofxKinectCalibration::isDepthNearValueWhite()'  
collect2: ld returned 1 exit status  
Process terminated with status 1 (0 minutes, 5 seconds)  
23 errors, 1 warnings  
   
  

Ok, solved my own problem. Just needed to add the files to Codeblocks.

Now I’m getting an error about a missing library:

  
error while loading shared libraries: libfmodex.so: cannot open shared object file: No such file or directory  

I checked the libs/fmodex folder in OpenFrameworks and the library appears to be there. Gonna keep trying but any help would be appreciated.

Also, should I open a new post for a new question? Thanks in advance for any help.

OK, fixed that as well and got it to compile. The library needed copying to /usr/lib/ .