QT & Opencv| 【待解决】Error - RtlWerpReportException failed with status code :-1073741823.

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39419087/article/details/81903363

【环境】

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

猜你喜欢

转载自blog.csdn.net/qq_39419087/article/details/81903363