Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The examples fails to compile #1

Open
GoogleCodeExporter opened this issue Aug 7, 2015 · 2 comments
Open

The examples fails to compile #1

GoogleCodeExporter opened this issue Aug 7, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 23 Jul 2012 at 12:55

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 24 Aug 2012 at 11:17

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 7 Oct 2013 at 1:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant