Clion:undefined reference to `cv::noArray()解决方案
生活随笔
收集整理的這篇文章主要介紹了
Clion:undefined reference to `cv::noArray()解决方案
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
完整問題復現(xiàn)如下:
====================[ Build | GaussNewton | Debug ]============================= /usr/local/bin/cmake --build /home/appleyuchi/CLionProjects/GaussNewton/cmake-build-debug --target GaussNewton -- -j 4 OpenCV_LIBS: opencv_calib3dopencv_coreopencv_dnnopencv_features2dopencv_flannopencv_gapiopencv_highguiopencv_imgcodecsopencv_imgprocopencv_mlopencv_objdetectopencv_photoopencv_stitchingopencv_videoopencv_videoioopencv_arucoopencv_bgsegmopencv_bioinspiredopencv_ccalibopencv_datasetsopencv_dnn_objdetectopencv_dpmopencv_faceopencv_freetypeopencv_fuzzyopencv_hfsopencv_img_hashopencv_line_descriptoropencv_optflowopencv_phase_unwrappingopencv_plotopencv_regopencv_rgbdopencv_saliencyopencv_shapeopencv_stereoopencv_structured_lightopencv_superresopencv_surface_matchingopencv_textopencv_trackingopencv_videostabopencv_xfeatures2dopencv_ximgprocopencv_xobjdetectopencv_xphoto -- Configuring done -- Generating done -- Build files have been written to: /home/appleyuchi/CLionProjects/GaussNewton/cmake-build-debug [ 50%] Building CXX object CMakeFiles/GaussNewton.dir/main.cpp.o [100%] Linking CXX executable GaussNewton /usr/bin/ld: CMakeFiles/GaussNewton.dir/main.cpp.o: in function `cv::operator+=(cv::Mat&, cv::Mat const&)': /home/appleyuchi/opencv/opencv_install/include/opencv4/opencv2/core/operations.hpp:261: undefined reference to `cv::noArray()' /usr/bin/ld: /home/appleyuchi/opencv/opencv_install/include/opencv4/opencv2/core/operations.hpp:261: undefined reference to `cv::add(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, int)' /usr/bin/ld: CMakeFiles/GaussNewton.dir/main.cpp.o: in function `GaussNewton(double (*)(cv::Mat const&, cv::Mat), cv::Mat const&, cv::Mat const&, cv::Mat)': /home/appleyuchi/CLionProjects/GaussNewton/main.cpp:119: undefined reference to `cv::Mat::t() const' /usr/bin/ld: /home/appleyuchi/CLionProjects/GaussNewton/main.cpp:119: undefined reference to `cv::Mat::t() const' /usr/bin/ld: /home/appleyuchi/CLionProjects/GaussNewton/main.cpp:119: undefined reference to `cv::operator*(cv::MatExpr const&, cv::Mat const&)' /usr/bin/ld: /home/appleyuchi/CLionProjects/GaussNewton/main.cpp:119: undefined reference to `cv::MatExpr::inv(int) const' /usr/bin/ld: /home/appleyuchi/CLionProjects/GaussNewton/main.cpp:119: undefined reference to `cv::operator*(cv::MatExpr const&, cv::MatExpr const&)' /usr/bin/ld: /home/appleyuchi/CLionProjects/GaussNewton/main.cpp:119: undefined reference to `cv::operator*(cv::MatExpr const&, cv::Mat const&)' /usr/bin/ld: CMakeFiles/GaussNewton.dir/main.cpp.o: in function `cv::Mat::Mat(cv::Mat const&)': /home/appleyuchi/opencv/opencv_install/include/opencv4/opencv2/core/mat.inl.hpp:538: undefined reference to `cv::Mat::copySize(cv::Mat const&)' /usr/bin/ld: CMakeFiles/GaussNewton.dir/main.cpp.o: in function `cv::Mat::~Mat()': /home/appleyuchi/opencv/opencv_install/include/opencv4/opencv2/core/mat.inl.hpp:739: undefined reference to `cv::fastFree(void*)' /usr/bin/ld: CMakeFiles/GaussNewton.dir/main.cpp.o: in function `cv::Mat::clone() const': /home/appleyuchi/opencv/opencv_install/include/opencv4/opencv2/core/mat.inl.hpp:811: undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const' /usr/bin/ld: CMakeFiles/GaussNewton.dir/main.cpp.o: in function `cv::Mat::create(int, int, int)': /home/appleyuchi/opencv/opencv_install/include/opencv4/opencv2/core/mat.inl.hpp:831: undefined reference to `cv::Mat::create(int, int const*, int)' /usr/bin/ld: CMakeFiles/GaussNewton.dir/main.cpp.o: in function `cv::Mat::release()': /home/appleyuchi/opencv/opencv_install/include/opencv4/opencv2/core/mat.inl.hpp:851: undefined reference to `cv::Mat::deallocate()' collect2: error: ld returned 1 exit status make[3]: *** [CMakeFiles/GaussNewton.dir/build.make:84: GaussNewton] Error 1 make[2]: *** [CMakeFiles/Makefile2:76: CMakeFiles/GaussNewton.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/GaussNewton.dir/rule] Error 2 make: *** [Makefile:118: GaussNewton] Error 2解決方案:
CMakeLists.txt
總結(jié)
以上是生活随笔為你收集整理的Clion:undefined reference to `cv::noArray()解决方案的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: clion variable set
- 下一篇: clion修改选中行的背景颜色