ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Adding following lines to your CMakeLists.txt will solve the problem. find_package(OpenCV your opencv version REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) And also add "${OpenCV_LIBRARIES}" in target_link_libraries line.
2 | No.2 Revision |
Adding following lines to your CMakeLists.txt will solve the problem.
find_package(OpenCV your opencv version REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
And also add "${OpenCV_LIBRARIES}" with ${catkin_LIBRARIES} in target_link_libraries line.line.
for eg.
target_link_libraries(your cpp file name ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})