Error when building package of calibration_publisher while installing Autoware [closed]

asked 2021-05-16 09:40:36 -0600

adams gravatar image

CMakeFiles/calibration_publisher.dir/nodes/calibration_publisher/calibration_publisher.cpp.o: In function void cv::operator>><cv::Mat>(cv::FileNode const&, cv::Mat&)': /usr/local/include/opencv4/opencv2/core/persistence.hpp:1281: undefined reference tocv::Mat::Mat()' CMakeFiles/calibration_publisher.dir/nodes/calibration_publisher/calibration_publisher.cpp.o: In function cv::internal::VecReaderProxy<int, 1>::operator()(std::vector<int, std::allocator<int> >&, unsigned long) const': /usr/local/include/opencv4/opencv2/core/persistence.hpp:868: undefined reference tocv::FileNodeIterator::remaining() const' /usr/local/include/opencv4/opencv2/core/persistence.hpp:877: undefined reference to cv::FileNodeIterator::readRaw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void*, unsigned long)' CMakeFiles/calibration_publisher.dir/nodes/calibration_publisher/calibration_publisher.cpp.o: In function__static_initialization_and_destruction_0': /home/adams/ls/src/ls_calibration/calibration_camera_lidar/nodes/calibration_publisher/calibration_publisher.cpp:10: undefined reference to cv::Mat::Mat()' /home/adams/ls/src/ls_calibration/calibration_camera_lidar/nodes/calibration_publisher/calibration_publisher.cpp:11: undefined reference tocv::Mat::Mat()' /home/adams/ls/src/ls_calibration/calibration_camera_lidar/nodes/calibration_publisher/calibration_publisher.cpp:12: undefined reference to cv::Mat::Mat()' CMakeFiles/calibration_publisher.dir/nodes/calibration_publisher/calibration_publisher.cpp.o: In functionmain': /home/adams/ls/src/ls_calibration/calibration_camera_lidar/nodes/calibration_publisher/calibration_publisher.cpp:186: undefined reference to cv::FileStorage::FileStorage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' CMakeFiles/calibration_publisher.dir/nodes/calibration_publisher/calibration_publisher.cpp.o: In functionmain': /usr/local/include/opencv4/opencv2/core/persistence.hpp:751: undefined reference to cv::FileNode::begin() const' /usr/local/include/opencv4/opencv2/core/persistence.hpp:1281: undefined reference tocv::read(cv::FileNode const&, std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)' collect2: error: ld returned 1 exit status ls_calibration/calibration_camera_lidar/CMakeFiles/calibration_publisher.dir/build.make:349: recipe for target '/home/adams/ls/devel/lib/calibration_camera_lidar/calibration_publisher' failed make[2]: * [/home/adams/ls/devel/lib/calibration_camera_lidar/calibration_publisher] Error 1 CMakeFiles/Makefile2:5306: recipe for target 'ls_calibration/calibration_camera_lidar/CMakeFiles/calibration_publisher.dir/all' failed make[1]: [ls_calibration/calibration_camera_lidar/CMakeFiles/calibration_publisher.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: ** [all] Error 2

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by adams
close date 2021-05-16 09:49:08.239221

Comments

such as follows websites, but i add the OpenCv LIB it's not work https://answers.ros.org/question/3320...

adams gravatar image adams  ( 2021-05-16 09:41:29 -0600 )edit

i tried to set OpenCV_DIR it's not work and my ubuntu18.04 installed opencv-4.1.5 without opencv_contrib,because opencv_contrib building error,

adams gravatar image adams  ( 2021-05-16 09:42:50 -0600 )edit

oh, i just solved it , we need write code ${OpenCV_LIBS} in the right block(calibration_publisher add executable)

adams gravatar image adams  ( 2021-05-16 09:48:55 -0600 )edit