Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved Opencv 3.1 with Cuda on QT 5.5.1

    General and Desktop
    2
    4
    2311
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jpmasiero last edited by

      Hi,
      I try use Opencv with Cuda to Qt a long time, but no sucess on this job. Now, i read on some foruns that g++ on Windows can't compile Opencv with Cuda to Qt, so I tried compile Opencv with Cuda on Visual Studio to Qt, I do not know if it works, but I tried. The problem happens when I compile on Qt, apparently compiling opencv in visual studio works, because QT recognizes the libraries but show errors bellow:

      C:\Users\Computador\Dropbox\goProCorrection\GoProQT\correction.cpp:31: error: undefined reference to cv::imread(cv::String const&, int)' C:\Users\Computador\Dropbox\goProCorrection\GoProQT\correction.cpp:32: error: undefined reference to cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
      C:\Users\Computador\Dropbox\goProCorrection\GoProQT\correction.cpp:37: error: undefined reference to cv::findChessboardCorners(cv::_InputArray const&, cv::Size_<int>, cv::_OutputArray const&, int)' C:\Users\Computador\Dropbox\goProCorrection\GoProQT\correction.cpp:40: error: undefined reference to cv::cornerSubPix(cv::InputArray const&, cv::InputOutputArray const&, cv::Size<int>, cv::Size<int>, cv::TermCriteria)'

      All erros are undefined reference to.

      On my .pro I put these:
      INCLUDEPATH += C://Opencv//3.1.0//release_cuda//install//include
      LIBS += C://Opencv//3.1.0//release_cuda//bin//Debug//*.dll

      1 Reply Last reply Reply Quote 0
      • J
        jpmasiero last edited by

        I solved this problem but now shows other error:
        During startup program exited with code 0xc000a200

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi and welcome to devnet,

          Based on your OpenCV location, my guess is that the application doesn't find its DLLs on startup. Go to the Run part of the Project panel, edit there the PATH environment variable and add the path to your OpenCV DLLs there.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • J
            jpmasiero last edited by

            I solved first problem setting msvc compiler on Qt and second problem compiling again tbb.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post