OpenCV和QT退出代码-1073741701 [英] OpenCV and QT exit code -1073741701
问题描述
Micka是对的 - 它需要highgui,所有.dll文件从D:\opencv_2411\opencv\build\x64\vc12\bin到调试目录。我有hadeaches,因为在此之前,我已经从我的Visual Studio 2013项目目录中复制所有.dll文件,但他们是x86,和QT项目是x64。谢谢大家!!!如果有人仍然有问题,请参阅此主题。
After this question I found that OpenCV gives me this error:
Starting C:\Users\nikola\Documents\build-ConsoleTry-Desktop_Qt_5_5_0_MSVC2013_64bit-Debug\debug\ConsoleTry.exe... C:\Users\nikola\Documents\build-ConsoleTry-Desktop_Qt_5_5_0_MSVC2013_64bit-Debug\debug\ConsoleTry.exe exited with code -1073741701
after trying to run this console code:
#include <QCoreApplication>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
using namespace::cv;
using namespace::std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
const char* filename = "1-page.png";
// cout << filename << endl;
cout << "111" << endl;
Mat src = imread(filename, 0);
cout << "222" << endl;
return a.exec();
}
How to fix it? I have copied DLL files in the debug directory. In this answer is mentioned the need of conversation of Mat to Qt QImage. Is this the case and are other objects required to be converted?
Result when start .exe from cmd.
Micka is right - it do need highgui, so I have copied all .dll files from D:\opencv_2411\opencv\build\x64\vc12\bin to debug directory. I was having hadeaches because before this I have copied all .dll files from my Visual Studio 2013 project directory, but they were x86, and the QT project is x64. Thank you all!!! And if someone still have problem see this topic too.
这篇关于OpenCV和QT退出代码-1073741701的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!