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

Compiling errors (without ROS) #24

Closed
Jamaslab opened this issue Jun 26, 2014 · 2 comments
Closed

Compiling errors (without ROS) #24

Jamaslab opened this issue Jun 26, 2014 · 2 comments

Comments

@Jamaslab
Copy link

Hello,
I get another error, but this one is maybe my fault.

/usr/bin/ld: CMakeFiles/test_depth_filter.dir/test/test_depth_filter.cpp.o: undefined reference to symbol 'cv::imread(std::basic_string<char, std::char_traits, std::allocator > const&, int)'
/usr/bin/ld: note: 'cv::imread(std::basic_string<char, std::char_traits, std::allocator > const&, int)' is defined in DSO /usr/lib/libopencv_highgui.so.2.3 so try adding it to the linker command line
/usr/lib/libopencv_highgui.so.2.3: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Am I using a wrong version of libopencv?

Thank you very much
Giacomo

@Jamaslab
Copy link
Author

Solved,
there was a wrong linking to OpenCV in the CMakeLists.txt

At line 79 the correct linking is
${OpenCV_LIBS}
instead of
${OpenCV_LIBRARIES}

@pablospe
Copy link

That is correct, it can be checked here:

http://docs.opencv.org/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html?highlight=OpenCV_LIBS#create-a-cmake-file

I think ${OpenCV_LIBRARIES} was also used in older versions , but not sure.

@cfo cfo closed this as completed in c34df8f Jun 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants