weixin_39735247
weixin_39735247
2020-12-06 10:13

ch5 运行imagebasics和undistortImage都出现了问题,是opencv的问题么?如何解决呢?

Scanning dependencies of target imageBasics Scanning dependencies of target undistortImage [ 50%] Building CXX object CMakeFiles/undistortImage.dir/undistortImage.cpp.o [ 50%] Building CXX object CMakeFiles/imageBasics.dir/imageBasics.cpp.o [ 75%] Linking CXX executable imageBasics CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘main’中: /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:13:对‘cv::imread(cv::String const&, int)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:23:对‘cv::imshow(cv::String const&, cv::InputArray const&)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:24:对‘cv::waitKey(int)’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘main’中: /usr/local/include/opencv2/core/mat.hpp:1267:对‘cv::noArray()’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘main’中: /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:56:对‘cv::Mat::setTo(cv::_InputArray const&, cv::_InputArray const&)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:57:对‘cv::imshow(cv::String const&, cv::_InputArray const&)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:58:对‘cv::waitKey(int)’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘main’中: /usr/local/include/opencv2/core/mat.hpp:1267:对‘cv::noArray()’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘main’中: /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:62:对‘cv::Mat::setTo(cv::_InputArray const&, cv::_InputArray const&)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:63:对‘cv::imshow(cv::String const&, cv::_InputArray const&)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:64:对‘cv::imshow(cv::String const&, cv::_InputArray const&)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:65:对‘cv::waitKey(int)’未定义的引用 /home/wei/下载/slambook2-master/ch5/imageBasics/imageBasics.cpp:68:对‘cv::destroyAllWindows()’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::String::String(char const)’中: /usr/local/include/opencv2/core/cvstd.hpp:602:对‘cv::String::allocate(unsigned long)’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::String::~String()’中: /usr/local/include/opencv2/core/cvstd.hpp:648:对‘cv::String::deallocate()’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::Mat::Mat(cv::Mat const&)’中: /usr/local/include/opencv2/core/mat.inl.hpp:569:对‘cv::Mat::copySize(cv::Mat const&)’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::Mat::~Mat()’中: /usr/local/include/opencv2/core/mat.inl.hpp:774:对‘cv::fastFree(void)’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::Mat::clone() const’中: /usr/local/include/opencv2/core/mat.inl.hpp:846:对‘cv::Mat::copyTo(cv::_OutputArray const&) const’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::Mat::release()’中: /usr/local/include/opencv2/core/mat.inl.hpp:886:对‘cv::Mat::deallocate()’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::Mat::operator()(cv::Rect const&) const’中: /usr/local/include/opencv2/core/mat.inl.hpp:912:对‘cv::Mat::Mat(cv::Mat const&, cv::Rect_ const&)’未定义的引用 CMakeFiles/imageBasics.dir/imageBasics.cpp.o:在函数‘cv::Mat::operator=(cv::Mat&&)’中: /usr/local/include/opencv2/core/mat.inl.hpp:1455:对‘cv::fastFree(void)’未定义的引用 collect2: error: ld returned 1 exit status CMakeFiles/imageBasics.dir/build.make:83: recipe for target 'imageBasics' failed make[2]: ** [imageBasics] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/imageBasics.dir/all' failed

该提问来源于开源项目:gaoxiang12/slambook2

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

5条回答