首页 > 其他 > 详细

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

时间:2015-05-14 10:00:45      阅读:2193      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!