Question

When trying to compile the following file in xcode:

http://openkinect.org/wiki/C%2B%2BOpenCvExample

I get these errors:

Ld build/Debug/KinectOpenCV normal x86_64
cd "/Users/Scott/Dropbox/Project/KinectOpenCV/KinectOpenCV"
setenv MACOSX_DEPLOYMENT_TARGET 10.7
/Developer/usr/bin/clang++ -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk "-L/Users/Scott/Dropbox/Project/KinectOpenCV/KinectOpenCV/build/Debug" "-F/Users/Scott/Dropbox/Project/KinectOpenCV/KinectOpenCV/build/Debug" -filelist "/Users/Scott/Dropbox/Project/KinectOpenCV/KinectOpenCV/build/KinectOpenCV.build/Debug/KinectOpenCV.build/Objects-normal/x86_64/KinectOpenCV.LinkFileList" -mmacosx-version-min=10.7 -lopencv_core.2.3.2 -lopencv_highgui.2.3.2 -lfreenect.0.0.1 -framework GLUT -framework OpenGL -o "/Users/Scott/Dropbox/Project/KinectOpenCV/KinectOpenCV/build/Debug/KinectOpenCV"

Undefined symbols for architecture x86_64:
"_freenect_find_video_mode", referenced from:
  freenect_threadfunc(void*) in main.o
"_freenect_set_video_mode", referenced from:
   freenect_threadfunc(void*) in main.o
"_freenect_find_depth_mode", referenced from:
  freenect_threadfunc(void*) in main.o
"_freenect_set_depth_mode", referenced from:
  freenect_threadfunc(void*) in main.o
"_freenect_select_subdevices", referenced from:
  _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've been trying everything I can think off to resolve the issue but no joy. I've tried compiling for specific architectures (32 bit or 64), I've tried relinking all the libraries and other such measures like starting a new project and importing everything again.

Was it helpful?

Solution

Sounds like you need to rebuild libfreenect.

I'd suggest following the directions on this tutorial and once you have everything re-installed, run that nm test again and see if the symbols finally appear.

If they don't, grep through the library source and see if they are defined and simply conditionalized out for some reason.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top