Hey.
I downloaded opencv 2.4.6 archive and extract it. Decided to use standart build from build/x86/mingw/lib. I had no compilation errors, but when I run my programm it's crashed on cv::namedWindow() or cv::imshow() functions.
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
using namespace std;
int main()
{
cv::Mat pic = cv::imread("1.jpg");
//cv::namedWindow("Smile", CV_WINDOW_NORMAL);
cv::imshow("Smile", pic);
cv::imwrite("2.jpg", pic);
cout << pic.rows << endl;
char ch;
cin >> ch;
cv::destroyWindow("Smile");
return 0;
}
I searched this problem in internet and found this solution. Then I tried to disable all checkboxes ENABLE_SSE in cmake, but it didn't work, programm is still crashing on imshow()
Could you, please, give me cmake properties for build opencv with mingw compiler. I use just mingw compiler without any IDE, but my friend uses QT, so I need to build this libraries with qt support, I also need this bug, with crashing on namedWindow calling, is fixed. I've got WIN7 32 on my computer.
I do built this way:
- configuring and generating cmake
- run terminal in the directory of cmake binary
- mingw32-make
- mingw32-make install
I hope you will help. Thanks a lot.