abdullah38rcc / fovis

Automatically exported from code.google.com/p/fovis
0 stars 0 forks source link

The examples fails to compile #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. both exmples fails to comple

What is the expected output? What do you see instead?

[ 96%] Building CXX object 
examples/fv-example-freenect/CMakeFiles/fv-example-freenect.dir/data_capture.cpp
.o
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp: In member 
function ‘bool fovis_example::DataCapture::initialize()’:
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp:61:3: error: 
‘freenect_frame_mode’ was not declared in this scope
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp:61:23: error: 
expected ‘;’ before ‘vmode’
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp:62:23: error: 
expected ‘;’ before ‘dmode’
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp:64:34: error: 
‘vmode’ was not declared in this scope
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp:64:39: error: 
‘freenect_set_video_mode’ was not declared in this scope
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp:65:34: error: 
‘dmode’ was not declared in this scope
~/src/libfovis/examples/fv-example-freenect/data_capture.cpp:65:39: error: 
‘freenect_set_depth_mode’ was not declared in this scope
make[3]: *** 
[examples/fv-example-freenect/CMakeFiles/fv-example-freenect.dir/data_capture.cp
p.o] Error 1
make[2]: *** 
[examples/fv-example-freenect/CMakeFiles/fv-example-freenect.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

What version of the product are you using? On what operating system?

I'm using a fresh installation of Ubuntu 12.04. with freenect  and newest 
OpenNI driver installed

Original issue reported on code.google.com by lakd...@gmail.com on 23 Jul 2012 at 12:55

GoogleCodeExporter commented 9 years ago
I'd got the same errors. It helps for me to change #include directive in 
data_capture.hpp to absolute path to freenect.h.
But i can't build this examples, got messages on make:

[ 50%] Building CXX object CMakeFiles/fv-example-freenect.dir/main.o
[100%] Building CXX object CMakeFiles/fv-example-freenect.dir/data_capture.o
Linking CXX executable bin/fv-example-freenect
CMakeFiles/fv-example-freenect.dir/data_capture.o: In function 
`fovis_example::DataCapture::initialize()':
data_capture.cpp:(.text+0x1fd): undefined reference to `freenect_init'
data_capture.cpp:(.text+0x22c): undefined reference to `freenect_set_log_level'
data_capture.cpp:(.text+0x23b): undefined reference to `freenect_num_devices'
data_capture.cpp:(.text+0x283): undefined reference to `freenect_open_device'
data_capture.cpp:(.text+0x2b5): undefined reference to `freenect_set_user'
data_capture.cpp:(.text+0x2cb): undefined reference to 
`freenect_find_video_mode'
data_capture.cpp:(.text+0x2e1): undefined reference to 
`freenect_find_depth_mode'
data_capture.cpp:(.text+0x30b): undefined reference to `freenect_set_video_mode'
data_capture.cpp:(.text+0x335): undefined reference to `freenect_set_depth_mode'
CMakeFiles/fv-example-freenect.dir/data_capture.o: In function 
`fovis_example::DataCapture::startDataCapture()':
data_capture.cpp:(.text+0x36d): undefined reference to `freenect_set_tilt_degs'
data_capture.cpp:(.text+0x382): undefined reference to `freenect_set_led'
data_capture.cpp:(.text+0x397): undefined reference to 
`freenect_set_depth_callback'
data_capture.cpp:(.text+0x3ac): undefined reference to 
`freenect_set_video_callback'
data_capture.cpp:(.text+0x3bc): undefined reference to `freenect_start_depth'
data_capture.cpp:(.text+0x3cc): undefined reference to `freenect_start_video'
CMakeFiles/fv-example-freenect.dir/data_capture.o: In function 
`fovis_example::DataCapture::stopDataCapture()':
data_capture.cpp:(.text+0x3f0): undefined reference to `freenect_stop_depth'
data_capture.cpp:(.text+0x400): undefined reference to `freenect_stop_video'
data_capture.cpp:(.text+0x410): undefined reference to `freenect_close_device'
data_capture.cpp:(.text+0x41f): undefined reference to `freenect_shutdown'
CMakeFiles/fv-example-freenect.dir/data_capture.o: In function 
`fovis_example::DataCapture::captureOne()':
data_capture.cpp:(.text+0x472): undefined reference to `freenect_process_events'
CMakeFiles/fv-example-freenect.dir/data_capture.o: In function 
`fovis_example::DataCapture::depth_cb(_freenect_device*, void*, unsigned int)':
data_capture.cpp:(.text+0x4a1): undefined reference to `freenect_get_user'
CMakeFiles/fv-example-freenect.dir/data_capture.o: In function 
`fovis_example::DataCapture::image_cb(_freenect_device*, void*, unsigned int)':
data_capture.cpp:(.text+0x4dd): undefined reference to `freenect_get_user'

I understand, it's ld errors, but i don't understand where and how to change 
its paths.

Original comment by Dubrovsk...@gmail.com on 24 Aug 2012 at 11:17

GoogleCodeExporter commented 9 years ago
edit CMakeLists.txt, add the path of libfreenect to static path like this will 
solve the problem:

set(LIBFREENECT_LIBS 
$HOME/myStacks/freenect/libfreenect/build/lib/libfreenect.so.0.2.0)

Original comment by ausu0...@gmail.com on 7 Oct 2013 at 1:06