ethz-asl / rgbd_segmentation

ROS package for geometric-semantic segmentation of RGB-D sequences.
MIT License
13 stars 1 forks source link

build error: undefined reference to‘cv::_OutputArray::_OutputArray(cv::Mat&)’when building with ubuntu 18 #2

Open liaoksn opened 1 year ago

liaoksn commented 1 year ago

Here is the output : [100%] Linking CXX executable /home/liaok/catkin_ws/devel/lib/rgbd_segmentation/rgbd_segmentation_node /home/liaok/catkin_ws/devel/lib/librgbd_segmentation.so:undefined reference to‘cv::_OutputArray::_OutputArray(cv::Mat&) /home/liaok/catkin_ws/devel/lib/librgbd_segmentation.so:undefined reference to‘cv::_InputArray::_InputArray(cv::Mat const&) collect2: error: ld returned 1 exit status CMakeFiles/rgbd_segmentation_node.dir/build.make:473: recipe for target '/home/liaok/catkin_ws/devel/lib/rgbd_segmentation/rgbd_segmentation_node' failed make[2]: [/home/liaok/catkin_ws/devel/lib/rgbd_segmentation/rgbd_segmentation_node] Error 1 CMakeFiles/Makefile2:201: recipe for target 'CMakeFiles/rgbd_segmentation_node.dir/all' failed make[1]: [CMakeFiles/rgbd_segmentation_node.dir/all] Error 2 Makefile:145: recipe for target 'all' failed make: *** [all] Error 2

liaoksn commented 1 year ago

I finally solved this problem by adding opencv dependency in Cmakelist.txt of rgbd_segmentation package