我已经安装了Code::Blocks with MinGW和OpenCV 2.4.3。我想编译这个简单的程序:
如何正确设置CodeBlocks以编译上述代码?
我已在c:\ opencv中安装了OpenCV。
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
Mat im = imread("c:/path/to/lena.jpg");
if (im.empty()) {
cout << "Cannot open image!" << endl;
return 1;
}
imshow("Image", im);
waitKey(0);
}
如何正确设置CodeBlocks以编译上述代码?
我已在c:\ opencv中安装了OpenCV。