[英]Qt OpenCV programm exits with code -1073741515
I try to use opencv and run a short example program. 我尝试使用opencv并运行一个简短的示例程序。
It exits with code -1073741515
. 它以代码
-1073741515
退出。 I never managed to use openCV on any of the 4 systems i tried, so i do something wrong but don't know what. 我从未尝试在尝试的4个系统中的任何一个上使用openCV,所以我做错了什么,但不知道是什么。
I had diffrenet errors using different attempts (undefined reference, crashing programm without error code, etc.), this here is the just simplest example. 我使用不同的尝试(未定义的引用,崩溃的程序且没有错误代码等)遇到了diffrenet错误,这是最简单的示例。
Another post told me, that -1073741515
is equal to 0xC0000135
meaning STATUS_DLL_NOT_FOUND
. 另一则帖子告诉我,
-1073741515
等于0xC0000135
表示STATUS_DLL_NOT_FOUND
。
The programm crashes, if include #include <opencv2/core/core.hpp>
, #include <opencv2/highgui/highgui.hpp>
and #include <opencv2/imgproc/imgproc.hpp>
. 如果包含
#include <opencv2/core/core.hpp>
, #include <opencv2/highgui/highgui.hpp>
和#include <opencv2/imgproc/imgproc.hpp>
,则程序崩溃。 When i comment them out, it runs wnd returns 0 as intended. 当我注释掉它们时,它将运行wnd返回预期的0。 I don't even need to use anything like
cv::Mat
or something to make it crash. 我什至不需要使用
cv::Mat
东西或使其崩溃。 That seems strange, because the code completion suggests me stuff from openCV, so it somehow sees it. 这似乎很奇怪,因为代码完成会向我推荐来自openCV的内容,因此可以通过某种方式看到它。 Including
#include <opencv2/opencv.hpp>
instead leads to the same error code. 包含
#include <opencv2/opencv.hpp>
会导致相同的错误代码。 Including something beginning with opencv (not opencv2) works, for example #include <opencv/cv.hpp>
, but has not enough functionality. 包括以opencv开头的内容(不是opencv2)是可以的,例如
#include <opencv/cv.hpp>
,但功能不足。
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
using namespace std;
int main()
{
cv::Mat InputImage = cv::imread("C:/Users/Public/Pictures/Sample Pictures/Chrysanthemum.jpg");
if(!InputImage.empty())
cv::imshow("test", InputImage);
else
cout << "imgage is empty" << endl;
return 0;
}
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
INCLUDEPATH += D:/opencv/build/include
LIBS += -LD:/opencv/build/x64/vc14/lib
LIBS += -lopencv_world343d
LIBS += -lopencv_world343
SOURCES += \
main.cpp
Include path: 包含路径:
libs: 库:
project: 项目:
build (copied the libs to the release/debug folders too): 构建(也将库复制到release / debug文件夹):
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.