Open liaoksn opened 1 year ago
Here is the output : [100%] [32m[1mLinking CXX executable /home/liaok/catkin_ws/devel/lib/rgbd_segmentation/rgbd_segmentation_node[0m /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
I finally solved this problem by adding opencv dependency in Cmakelist.txt of rgbd_segmentation package
Here is the output : [100%] [32m[1mLinking CXX executable /home/liaok/catkin_ws/devel/lib/rgbd_segmentation/rgbd_segmentation_node[0m /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