I already compiled I already compiled libfreenect for natty and now I am trying to install kinect mouse: https://github.com/Ooblik/Kinect-Mouse/
But when I type make
I receive an error...
This is the terminal:
eric@eric-desktop:~$ cd /home/eric/kinect_mouse
eric@eric-desktop:~/kinect_mouse$ mkdir build
eric@eric-desktop:~/kinect_mouse$ cd build
eric@eric-desktop:~/kinect_mouse/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eric/kinect_mouse/build
eric@eric-desktop:~/kinect_mouse/build$ make
Scanning dependencies of target kmouse
[100%] Building C object CMakeFiles/kmouse.dir/kinect_mouse.c.o
Linking C executable kmouse
CMakeFiles/kmouse.dir/kinect_mouse.c.o: In function `freenect_threadfunc':
kinect_mouse.c:(.text+0xd6d): undefined reference to `freenect_set_video_format'
kinect_mouse.c:(.text+0xd81): undefined reference to `freenect_set_depth_format'
collect2: ld returned 1 exit status
make[2]: *** [kmouse] Error 1
make[1]: *** [CMakeFiles/kmouse.dir/all] Error 2
make: *** [all] Error 2
eric@eric-desktop:~/kinect_mouse/build$
That error indicates a missing library. Doing a
grep -rn freenect_set_video_format .
in the directory containinglibfreenect
revealed thatfakenect/fakenect.c
contained the required function. Reading the fakenect/README made clear that you need to link against that library when buildingkinect_mouse
.So, edit
kinect_mouse/CMakeLists.txt
and putlink_directories(/usr/local/lib64/fakenect)
in it:Clear your build directory and build again.