I have been trying this for the whole day and I managed to make it work openCV but not , and now that I am able to use (cout<<, for example) the compiler doesn´t find the OpenCV libraries. I am trying with a test program:
//
// AR_openCV.cpp
//
// Created on: Dec 20, 2011
// Author: jbarbadillo
///
#include "opencv/cv.h"
#include "opencv/highgui.h"
#include "opencv2/opencv.hpp"
#include "opencv2/core/core.hpp"
#include "iostream"
#include "stdio.h"
using namespace cv;
using namespace std;
int main()
{
cout << "!!!Hello OpenCV!!!" <<endl;
IplImage* img = 0;
img=cvLoadImage("C:/Users/jbarbadillo/Desktop/1.jpg"); // carica l'immagine
cvNamedWindow("mainWin", CV_WINDOW_AUTOSIZE); // crea la finestra
cvShowImage("mainWin", img ); // mostra l'immagine
cvWaitKey(0); // wait for a key
cvReleaseImage(&img ); //rilascia l'immagine
waitKey(0);
return 0;
}
I have linked the OpenCV includes in C++ compiler and the libraries in the C++ linker. Also the environment variables are checked.
What else can I check? I have followed many tutorials on this but still getting errors on compilation.
Thanks.
UPDATE:
The problem was that though thew libraries were linked to the project the werent to the src.cpp. Now they are and i can compile. The problem now is that I build the program but I don't get any image.