I can build and execute the code below successfully :
IplImage* img = cvLoadImage("C:\\hello.jpg");
cvNamedWindow("myfirstwindow");
cvShowImage("myfirstwindow", img);
But I got the unhandled exception when executed the code below:
cv::Mat image= cv::imread("boldt.jpg");
cv::namedWindow("Image");
cv::imshow("Image",image);
although,I can build the code successfully.
I’m using opencv2.2 with VS2010 x86 version on windows 7 x86 version.
please help !
update: I tried it on winxp ,and it works fine…and it works fine with win7 on Release mode only.
I’m using OpenCV 2.3.1 and when I run it in Release mode (linked to a release highgui lib), everything is fine.
When I switch to Debug mode (still linked to a release highgui lib), it crashes.
Linking to a debug highgui lib helped.
Maybe you have the same problem…