QT & Opencv| 【待解決】Error - RtlWerpReportException failed with status code :-1073741823.
阿新 • • 發佈:2018-12-13
【環境】
Qt Creator 4.6.2 (based on Qt 5.11.1 MSVC 2015,32bit)
opencv 3.4.2
配置好QT之後,編寫測試程式碼,顯示一張圖片失敗。
程式碼如:
QT -= gui CONFIG += c++11 console CONFIG -= app_bundle # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp INCLUDEPATH += E:/Arya/opencv/opencv/include \ E:/Arya/opencv/opencv/include/opencv \ E:/Arya/opencv/opencv/include/opencv2 LIBS += E:/Arya/opencv/opencv/x86/mingw/lib/libopencv_*
#include <QCoreApplication>
#include <opencv2/opencv.hpp>
using namespace cv;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
Mat srcImage=imread("C:/Users/Administrator/Desktop/th.jpg");
imshow("image",srcImage);
waitKey(0);
return a.exec();
}
執行效果:
應用程式輸出:
Starting E:\Arya\program\workplace\qt\build-opencvtest3-Desktop_Qt_5_11_1_MinGW_32bit-Release\release\opencvtest3.exe... Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly E:/Arya/program/workplace/qt/build-opencvtest3-Desktop_Qt_5_11_1_MinGW_32bit-Release/release/opencvtest3.exe exited with code -1073741819