I am trying to run a program that uses OpenCV and I have gotten it to run on other machines, and other programs on my machine run using it, but this one returns:
programname.cpp: fatal error: opencv/cv.h: No such file or directory
Anyone know how to fix the path or what might be going wrong? I am running Ubuntu 12.04 and OpenCV-2.4.0
On my Ubuntu 11.04, the headers are in:
*/usr/include/opencv-2.3.1/*, I assume it should be*/usr/include/opencv-2.4.0/*for you.You have two solutions:
-Ioption:g++ -o [name] [src] -I/usr/include/opencv-2.4.0The second solution is useful if you’re using CMake, because FindOpenCV2 does not look for OpenCV in
/usr/include/opencv-2.4.0. I hope this (ugly) hack will solve your problem.