Cannot load OpenCV library

Hi, I am trying to run a console program but for any reason it displays an error on the cv.h line.

Can somebody help me, please?
What error? Could we see your code?
Yes. Thank you! First let me tell you that I downloaded the OpenCV library and that I have to extract files and I am not sure if I did that correctly.

#include <stdlib.h>
#include <cv.h>
#include <highgui.h>
{



int main()

Iplimage* img = cvLoadImage("C:\\hello.jpg");
cvNameWindow ("myfirstwindow");
cvLoadImage ("myfirstwindow", img);

cvWaitKey(0);
cvReleaseImage(&img);
return 0;

}


Last edited on
Where did you extract the 'cv.h' file to? Is it in the include paths for your compiler?
Again thank you for your help. I downloaded opencv from sourceforge and after that doubled click on the file and thats all. However I think the problem is there but I do not know how to fix it.
As NT3 mentioned earlier if you are going to include with <> you must have it in the include path of your compiler otherwise you will need to tell it the location of the file like: #include "c:\users\me\desktop\cv.h" though if you are using unix you are going to need forward slashes.
Topic archived. No new replies allowed.