Coder Social home page Coder Social logo

opencvimage's Issues

Does the opencv version have to be 4.5.3?

I did a quick test and qt and opencv worked. For this project, the compile passed, but the runtime reported the error. Can you help me see what the problem is?

====================[ Build | main | Debug ]====================================
"E:\Clion\CLion 2022.2.3\bin\cmake\win\bin\cmake.exe" --build C:\Users\User\Desktop\OpenCVImage-main\cmake-build-debug --target main -j 9
[1/5] Automatic MOC and UIC for target main
[2/5] Building CXX object CMakeFiles/main.dir/open_image/main.cpp.obj
[3/5] Building CXX object CMakeFiles/main.dir/main_autogen/mocs_compilation.cpp.obj
[4/5] Building CXX object CMakeFiles/main.dir/open_image/mainwindow.cpp.obj
[5/5] Linking CXX executable main.exe
FAILED: main.exe
cmd.exe /C "cd . && E:\Qt\Tools\mingw1120_64\bin\c++.exe -g CMakeFiles/main.dir/main_autogen/mocs_compilation.cpp.obj CMakeFiles/main.dir/open_image/main.cpp.obj CMakeFiles/main.dir/open_image/mainwindow.cpp.obj -o main.exe -Wl,--out-implib,libmain.dll.a -Wl,--major-image-version,0,--minor-image-version,0 E:/Qt/6.5.3/mingw_64/lib/libQt6Widgets.a E:/OpenCV-MinGW-Build-OpenCV-4.5.5-x64/x64/mingw/lib/libopencv_highgui455.dll.a E:/Qt/6.5.3/mingw_64/lib/libQt6Gui.a E:/Qt/6.5.3/mingw_64/lib/libQt6Core.a -lmpr -luserenv -ld3d11 -ldxgi -ldxguid E:/OpenCV-MinGW-Build-OpenCV-4.5.5-x64/x64/mingw/lib/libopencv_videoio455.dll.a E:/OpenCV-MinGW-Build-OpenCV-4.5.5-x64/x64/mingw/lib/libopencv_imgcodecs455.dll.a E:/OpenCV-MinGW-Build-OpenCV-4.5.5-x64/x64/mingw/lib/libopencv_imgproc455.dll.a E:/OpenCV-MinGW-Build-OpenCV-4.5.5-x64/x64/mingw/lib/libopencv_core455.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/main_autogen/mocs_compilation.cpp.obj: in function MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)': C:/Users/User/Desktop/OpenCVImage-main/cmake-build-debug/main_autogen/RHWSHNTO6O/moc_mainwindow.cpp:440: undefined reference to MainWindow::on_checkBox_stateChanged()'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/cmake-build-debug/main_autogen/RHWSHNTO6O/moc_mainwindow.cpp:470: undefined reference to MainWindow::on_SIFT_clicked()' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function MainWindow::on_mix_guass_clicked()':
C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1211: undefined reference to cv::createBackgroundSubtractorKNN(int, double, bool)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1212: undefined reference to cv::createBackgroundSubtractorMOG2(int, double, bool)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function MainWindow::on_orb_clicked()': C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1555: undefined reference to cv::ORB::create(int, float, int, int, int, int, cv::ORB::ScoreType, int, int)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1562: undefined reference to cv::BFMatcher::BFMatcher(int, bool)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1564: undefined reference to cv::DescriptorMatcher::match(cv::InputArray const&, cv::InputArray const&, std::vector<cv::DMatch, std::allocatorcv::DMatch >&, cv::InputArray const&) const'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1566: undefined reference to cv::drawMatches(cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, std::vector<cv::DMatch, std::allocator<cv::DMatch> > const&, cv::_InputOutputArray const&, cv::Scalar_<double> const&, cv::Scalar_<double> const&, std::vector<char, std::allocator<char> > const&, cv::DrawMatchesFlags)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1586: undefined reference to cv::findHomography(cv::InputArray const&, cv::InputArray const&, int, double, cv::OutputArray const&, int, double)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1598: undefined reference to cv::drawMatches(cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, std::vector<cv::DMatch, std::allocator<cv::DMatch> > const&, cv::_InputOutputArray const&, cv::Scalar_<double> const&, cv::Scalar_<double> const&, std::vector<char, std::allocator<char> > const&, cv::DrawMatchesFlags)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function MainWindow::on_svm_test_clicked()':
C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1783: undefined reference to cv::ml::SVM::create()' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function MainWindow::on_word_test_clicked()':
C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1867: undefined reference to cv::ml::SVM::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:1883: undefined reference to cv::HOGDescriptor::compute(cv::InputArray const&, std::vector<float, std::allocator >&, cv::Size, cv::Size
, std::vector<cv::Point
, std::allocator<cv::Point > > const&) const'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function MainWindow::on_face_haar_clicked()': C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2067: undefined reference to cv::CascadeClassifier::CascadeClassifier()'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2068: undefined reference to cv::CascadeClassifier::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2090: undefined reference to cv::CascadeClassifier::detectMultiScale(cv::InputArray const&, std::vector<cv::Rect, std::allocator<cv::Rect > >&, double, int, int, cv::Size, cv::Size)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2106: undefined reference to cv::CascadeClassifier::~CascadeClassifier()' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2106: undefined reference to cv::CascadeClassifier::~CascadeClassifier()'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function MainWindow::on_camera2_clicked()': C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2230: undefined reference to cv::findChessboardCorners(cv::InputArray const&, cv::Size, cv::_OutputArray const&, int)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2231: undefined reference to cv::findChessboardCorners(cv::_InputArray const&, cv::Size_<int>, cv::_OutputArray const&, int)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2235: undefined reference to cv::drawChessboardCorners(cv::InputOutputArray const&, cv::Size, cv::_InputArray const&, bool)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2240: undefined reference to cv::drawChessboardCorners(cv::_InputOutputArray const&, cv::Size_<int>, cv::_InputArray const&, bool)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2264: undefined reference to cv::stereoCalibrate(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputOutputArray const&, cv::_InputOutputArray const&, cv::_InputOutputArray const&, cv::InputOutputArray const&, cv::Size, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, int, cv::TermCriteria)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2272: undefined reference to cv::stereoRectify(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::Size_<int>, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, int, double, cv::Size_<int>, cv::Rect_<int>*, cv::Rect_<int>*)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2276: undefined reference to cv::initUndistortRectifyMap(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::InputArray const&, cv::Size, int, cv::_OutputArray const&, cv::_OutputArray const&)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2277: undefined reference to cv::initUndistortRectifyMap(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::Size_<int>, int, cv::_OutputArray const&, cv::_OutputArray const&)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function stereo_match(int, void*)':
C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2412: undefined reference to cv::reprojectImageTo3D(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, bool, int)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function MainWindow::on_camera2_2_clicked()':
C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2425: undefined reference to cv::stereoRectify(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::Size_<int>, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, int, double, cv::Size_<int>, cv::Rect_<int>*, cv::Rect_<int>*)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2427: undefined reference to cv::initUndistortRectifyMap(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::InputArray const&, cv::Size, int, cv::_OutputArray const&, cv::_OutputArray const&)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2428: undefined reference to cv::initUndistortRectifyMap(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::Size_<int>, int, cv::_OutputArray const&, cv::_OutputArray const&)' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj:C:/Users/User/Desktop/OpenCVImage-main/open_image/mainwindow.cpp:2385: undefined reference to cv::StereoBM::create(int, int)'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj: in function cv::BFMatcher::~BFMatcher()': E:/OpenCV-MinGW-Build-OpenCV-4.5.5-x64/include/opencv2/features2d.hpp:1191: undefined reference to cv::DescriptorMatcher::~DescriptorMatcher()'
E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj:mainwindow.cpp:(.rdata$.refptr._ZTVN2cv13HOGDescriptorE[.refptr._ZTVN2cv13HOGDescriptorE]+0x0): undefined reference to vtable for cv::HOGDescriptor' E:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/main.dir/open_image/mainwindow.cpp.obj:mainwindow.cpp:(.rdata$.refptr._ZTVN2cv9BFMatcherE[.refptr._ZTVN2cv9BFMatcherE]+0x0): undefined reference to vtable for cv::BFMatcher'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.