I installed Eclipse + CDT and OpenCV with:
$ sudo apt-get install libcv1 libcv-dev libcvaux1 libcvaux-dev \ libhighgui1 libhighgui-dev \ opencv-doc \ python-opencv
After that, I opened Eclipse and created a new c / C ++ project. So I typed this code:
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <cv.h> #include <highgui.h> int main(int argc, char *argv[]) { IplImage* img = 0; img=cvLoadImage("C:/.../Pictures/immagine.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 system("PAUSE"); return 0; }
The problem is that I return these errors:
Unresolved inclusion: <cv.h> Unresolved inclusion: <highgui.h>
But in my eclipse workspace project, I have these libraries in the / usr / include directory ...
What could be wrong? Thank you
source share