The Background: I need to use OpenCV for various Image Processing projects. To get it to work on my system(32-bit Windows 7, CodeBlocks IDE, TDM-GCC 4.8.1) I downloaded the OpenCV 3.0 sources from the OpenCV website and built it using Cmake(the only significant thing I did in this step was disable ipp) and mingw compiler. I linked the include directory and libraries to the C::B environment.
The Problem: When I run the following sample code I get an error.
*
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgcodecs.hpp"
using namespace cv;
using namespace std;
int main()
{
Mat img;
img = imread("lena.jpg");
imshow("Original Image", img);
waitKey();
}
*
The error log being:
||=== Build: Debug in opencv (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function ZN2cv3Mat7releaseEv':|
F:\opencvbuild\include\opencv2\core\mat.inl.hpp|655|undefined reference to
__atomic_fetch_add_4'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 9 second(s)) ===|
How do I get the library to work? Any possible hack or directly accessible binary files solution will do.