Could not find a configuration file for package opencv2解决 方法

时间:2015-05-14 10:00:45   收藏:0   阅读:2192

Remove OpenCv Opencv2 etc. from your run and build depends (in package.xml) as well as from the line find_package( catkin REQUIRED COMPONENTS .... (in CMakeLists.txt)

With catkin in groovy/hydro OpenCV is always embedded as stand-alone package using:

find_package( OpenCV REQUIRED )


(Note than I‘ve added the REQUIRED)

Note that you have also to add OpenCV include directories like

include_directories(  ${catkin_INCLUDE_DIRS}  ${OpenCV_INCLUDE_DIRS} )


and for each of your execs/libs you created as target like

add_executable( my_exec my_cpp_file.cpp )


you need to link against both catkin and OpenCV libs:

target_link_libraries ( my_exec ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} )


原文:http://blog.csdn.net/dxuehui/article/details/45716627

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!