line_det.cpp:(.text+0x1299):对‘cv::imshow(cv::String const&, cv::
/usr/bin/ld: warning: libmysqlclient.so.20, needed by //usr/lib/libgdal.so.20, not found (try using -rpath or -rpath-link)
CMakeFiles/line.dir/src/line_det.cpp.o:在函数‘imageCallback(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)’中:
line_det.cpp:(.text+0x1299):对‘cv::imshow(cv::String const&, cv::_InputArray const&)’未定义的引用
line_det.cpp:(.text+0x12c1):对‘cv::waitKey(int)’未定义的引用
CMakeFiles/line.dir/src/line_det.cpp.o:在函数‘main’中:
line_det.cpp:(.text+0x19c2):对‘cv::namedWindow(cv::String const&, int)’未定义的引用
line_det.cpp:(.text+0x1a00):对‘cv::resizeWindow(cv::String const&, int, int)’未定义的引用
打开功能包的CMakeLists.txt文件,在文件中添加opencv库:
find_package(OpenCV REQUIRED)
然后在生成节点时也添加opencv库:
target_link_libraries(xxxx ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
重新编译项目,就可以成功!
- 点赞
- 收藏
- 关注作者
评论(0)