码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-05-14 10:04:02      阅读:782      评论:0      收藏:0      [点我收藏+]

标签:

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} )


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

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!