Can't debug the program with OpenCV in Qt Creator



  • Hello everyone.
    When I choose msvc2010 release compiler in Qt Creator,it works well.But when I choose msvc2010 debug compiler,it will show message "Unrecognized or unsupported array type in cvGetMat function" in console and a messagebox "Runtime Error" .I never used that function because I only use the C++ interface of OpenCV.
    Here is the code of my .pro file
    @#-------------------------------------------------

    Project created by QtCreator 2012-05-24T11:07:57

    #-------------------------------------------------
    QT += core
    QT -= gui
    TARGET = morphological_filters
    CONFIG += console
    CONFIG -= app_bundle
    TEMPLATE = app
    SOURCES += main.cpp
    morphofeatures.cpp
    watershedsegmenter.cpp
    INCLUDEPATH +=D:\OpenCV\opencv\build\include\opencv2
    D:\OpenCV\opencv\build\include\opencv
    D:\OpenCV\opencv\build\include
    CONFIG(release,debug|release)
    {
    LIBS += D:\OpenCV\opencv\build\x86\vc10\lib\opencv_calib3d231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_contrib231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_core231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_features2d231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_flann231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_gpu231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_highgui231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_imgproc231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_legacy231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_ml231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_objdetect231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_ts231.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_video231.lib
    }
    CONFIG(debug,debug|release)
    {
    LIBS +=D:\OpenCV\opencv\build\x86\vc10\lib\opencv_calib3d231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_contrib231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_core231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_features2d231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_flann231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_gpu231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_highgui231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_imgproc231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_legacy231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_ml231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_objdetect231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_ts231d.lib
    D:\OpenCV\opencv\build\x86\vc10\lib\opencv_video231d.lib
    }
    HEADERS +=
    morphofeatures.h
    watershedsegmenter.h@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.