Groovy and OpenCV: Linker errors
Hi! I'm trying to compile a ROS package in Ubuntu 12.04 64bit which has been used in Fuerte and uses OpenCV. As recommended on the opencv2 ROS Wiki page (http://www.ros.org/wiki/opencv2), I would like to change the way of including OpenCV from the old <depend package="opencv2" />
tag in the manifest.xml. Thus according to the wiki, I changed that entry to <rosdep name="opencv2"/>
and edited my CMakeLists.txt to contain
find_package(OpenCV REQUIRED)
#define some target ...
target_link_libraries(my_target ${OpenCV_LIBRARIES})
If I try to build the package with rosmake I get errors during the linking process:
Linking CXX executable ../bin/mr
../lib/libmr_lib.so: undefined reference to `cv::waitKey(int)'
../lib/libmr_lib.so: undefined reference to `cv::imshow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
../lib/libmr_lib.so: undefined reference to `cvMoveWindow'
../lib/libmr_lib.so: undefined reference to `cv::namedWindow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
collect2: ld returned 1 exit status
make[3]: *** [../bin/mr] Error 1
libopencv2.4-dev is installed. Any help would be very appreciated! Thank you!