Important: Please read the Qt Code of Conduct -

Opencv 3.1 with Cuda on QT 5.5.1

  • 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 tocv::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 tocv::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

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

  • Lifetime Qt Champion

    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.

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

Log in to reply