I downloaded opencv 2.4.5 and tried to configure in Visual studio 11. I tried compiling the below code in Debug mode by following the steps from this link. It works fine.
But the same code get crahes in release mode.
The below is the code.
#include "stdafx.h"
#include <opencv2/opencv.hpp>
using namespace cv;
int main()
{
Mat img(Mat::zeros(100, 100, CV_8U));
imshow("window", img);
waitKey();
return 0;
}