I write a simple OpenCV program that tries to open an image "kindle-fire-hd.jpg" in the same directory. The IDE is Code::Block and the version OpenCV is 2.4.2 and the compiler is MinGW which is attached as the component of Code::Block. The code is shown here:
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
Mat im = imread(argc == 2 ? argv[1] : "kindle-fire-hd.jpg", 1);
if (im.empty())
{
cout << "Cannot open image!" << endl;
return -1;
}
imshow("image", im);
waitKey(0);
return 0;
}
It can be built and compiled correctly (without any error and warning messages) and I have configured the Code::Block as that said in Getting started with OpenCV 2.4 and MinGW on Windows 7 .
However, when I "run" this program. it shows a "missing libgcc_s_dw2-1.dll" message.
And, when I click the "OK" button, the console window shows the following message:
I tried to search the related Questions on stackoverflow but all their solutions cannot fix this problem. Thanks.