I'm new here and I've been trying to set up OpenCV on my codeblocks IDE. I'm not sure whats wrong. I'm using windows 7, 64bit system, and codeblocks, I also downloaded 2-4.3 version of OpenCV.
I tried following the manual intsructions here, but that was of no help: http://opencv.willowgarage.com/wiki/CodeBlocks
Even though I'm trying to use codeblocks I also tried: Installing OpenCV 2.4.3 in Visual C++ 2010 Express
I have my path set to: C:\OpenCV\build\x64\vc10\bin
And for the compiler settings under tab "search directories": "Compiler" : C:\OpenCV\build\include "Linker" : C:\OpenCV\build\x64\vc10\lib
And then under the tab "Linker settings" I have all the .lib files from C:\OpenCV\build\x64\vc10\lib
I tried running this as my test program and it gives me an error readout connecting to operations.hpp header file:
#include "opencv2/highgui/highgui.hpp"
#include "iostream"
using namespace cv;
using namespace std;
int main()
{
Mat im = imread("c:/full/path/to/lena.jpg");
if (im.empty())
{
cout << "Cannot load image!" << endl;
return -1;
}
imshow("Image", im);
waitKey(0);
}
The error says:
C:\OpenCV\build\include\opencv2\core\operations.hpp|3915|error: expected primary-expression before '>' token|
C:\OpenCV\build\include\opencv2\core\operations.hpp|3915|error: expected primary-expression before ')' token|
....and a bunch of other stuff, but those are the first 2 errors.
So my 2 fold question is this:
1) Did I set up my IDE correctly?
2) Is there something wrong with the OpenCV code?