New problem linking OpenCV Indigo Cplusplus node
Indigo, Ubuntu 14.04 (Linux Mint 17.1)
I had a problem the other day that turned out to be missing find_package(OpenCV) so that was resolved.
But I have a new one. I have a better tracking test that builds and runs fine outside of ROS. But catkin_make gives this:
catkin_make Base path: /home/bbick/ros_ws Source space: /home/bbick/ros_ws/src Build space: /home/bbick/ros_ws/build Devel space: /home/bbick/ros_ws/devel Install space: /home/bbick/ros_ws/install ####
Running command: "make cmake_check_build_system" in "/home/bbick/ros_ws/build"
#### ####
Running command: "make -j6 -l6" in "/home/bbick/ros_ws/build"
####
[ 0%] Built target dynamic_reconfigure_generate_messages_py
[ 0%] [ 0%] Built target roscpp_generate_messages_lisp
Built target roscpp_generate_messages_cpp
[ 11%] Built target talker
[ 22%] Linking CXX executable /home/bbick/ros_ws/devel/lib/inmoovhead/myopencvtest
Built target listener
[ 22%] Built target roscpp_generate_messages_py
[ 22%] [ 22%] [ 22%] Built target std_msgs_generate_messages_lisp
Built target std_msgs_generate_messages_py
Built target rosgraph_msgs_generate_messages_py
[ 22%] Built target rosgraph_msgs_generate_messages_lisp
[ 22%] Built target rosgraph_msgs_generate_messages_cpp
[ 22%] [ 22%] Built target dynamic_reconfigure_gencfg
[ 33%] Built target pid_gencfg
[ 33%] Built target std_msgs_generate_messages_cpp
Built target dynamic_reconfigure_generate_messages_cpp
[ 33%] Built target dynamic_reconfigure_generate_messages_lisp
[ 33%] Built target diagnostic_msgs_generate_messages_cpp
[ 33%] [ 33%] Built target diagnostic_msgs_generate_messages_lisp
Built target diagnostic_msgs_generate_messages_py
[ 44%] [ 55%] Built target autotune
Built target setpoint_node
[ 66%] Built target plant_sim
[ 77%] Built target controller
[ 88%] Built target sim_time
CMakeFiles/myopencvtest.dir/src/myopencvtest.cpp.o: In function main':
myopencvtest.cpp:(.text+0x46e): undefined reference to
cv::CommandLineParser::CommandLineParser(int, char const* const, cv::String const&)'
myopencvtest.cpp:(.text+0x4aa): undefined reference to cv::CommandLineParser::has(cv::String const&) const'
myopencvtest.cpp:(.text+0x54c): undefined reference to
cv::CommandLineParser::printMessage() const'
myopencvtest.cpp:(.text+0x8e5): undefined reference to cv::namedWindow(cv::String const&, int)'
myopencvtest.cpp:(.text+0x91c): undefined reference to
cv::namedWindow(cv::String const&, int)'
myopencvtest.cpp:(.text+0x958): undefined reference to cv::setMouseCallback(cv::String const&, void (*)(int, int, int, int, void*), void*)'
myopencvtest.cpp:(.text+0x9bb): undefined reference to
cv::createTrackbar(cv::String const&, cv::String const&, int, int, void ()(int, void), void)'
myopencvtest.cpp:(.text+0xa2d): undefined reference to cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)'
myopencvtest.cpp:(.text+0xa9f): undefined reference to
cv::createTrackbar(cv::String const&, cv::String const&, int, int, void ()(int, void), void)'
myopencvtest.cpp:(.text+0xff0): undefined reference to cv::normalize(cv::_InputArray const&, cv::_InputOutputArray const&, double, double, int, int, cv::_InputArray const&)'
myopencvtest.cpp:(.text+0x12b4): undefined reference to
cv::rectangle(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
myopencvtest.cpp:(.text+0x176c): undefined reference to cv::ellipse(cv::_InputOutputArray const&, cv::RotatedRect const&, cv::Scalar_<double> const&, int, int)'
myopencvtest.cpp:(.text+0x18aa): undefined reference to
cv::imshow(cv::String const&, cv::_InputArray const&)'
myopencvtest.cpp:(.text+0x190e): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)'
myopencvtest.cpp:(.text+0x1a09): undefined reference to
cv::destroyWindow(cv::String const&)'
myopencvtest.cpp:(.text+0x1a42): undefined reference to cv::namedWindow(cv::String const&, int)'
myopencvtest.cpp:(.text+0x1b39): undefined reference to
cv::CommandLineParser::~CommandLineParser()'
myopencvtest ...
Please add your CMakeList.txt so people can help you.
I ran a cut-down version of your CMakeLists.txt on the first OpenCV sample (contours2.cpp), and it compiled fine. Please post your source files and the complete output of catkin_make so we can see what values it is finding when it searches for OpenCV.