imshow namedWindow crash
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.
Do you get any kind of error message when your program crashes, or does it just exit completely? Also, it is not clear from your description; if you uncomment the namedWindow line, does your program crash on the namedWindow function or the imshow function?
yes, error msg please.
and, did you check the WITH_QT box ?
man, that ticket is 3 years old ... the current issues are here
I got no errors in terminal, just only gray window with no image inside. You know just a hang up window and when you want to close it windows pops up a message with buttons "close" "wait for response" ...
May be somehow I can post an screenshot to explain what I mean, but it will be russian language.