OpenCV: No such file or directory
-
Hello, a lot of problems arose when installing OpenCV on Ubuntu to work in QtCreator, but they were somehow solved and now the time has come to test this library in QtCreator. And here again the error, which I can no longer understand how to solve, maybe someone faced this problem? (screenshots of the problem are attached)
Perhaps Qt cannot access the files, but I can’t know for sure, I also attached screenshots of the folders (from 3 picture)
-
@zzzKennYzzz
Since you have the/.../opencv4/opencv2
directory on yourINCLUDEPATH
, remove the leadingopencv4/opencv2/
from the#include <opencv4/opencv2/...>
directives.If that is not it, find out whether the file mentioned in the error message exists in that include directory or anywhere.
-
add all of them
INCLUDEPATH += /usr/local/include/opencv4/opencv2
DEPENDPATH += /usr/local/include/opencv4/opencv2INCLUDEPATH += /usr/local/include/opencv4/opencv2/core
DEPENDPATH += /usr/local/include/opencv4/opencv2/coreINCLUDEPATH += /usr/local/include/opencv4/opencv2/highgui
DEPENDPATH += /usr/local/include/opencv4/opencv2/highguisimply include header files in any cpp file
#include "core.hpp" -
@JoeCFD said in OpenCV: No such file or directory:
add all of them
INCLUDEPATH += /usr/local/include/opencv4/opencv2
DEPENDPATH += /usr/local/include/opencv4/opencv2add all of them
INCLUDEPATH += /usr/local/include/opencv4
DEPENDPATH += /usr/local/include/opencv4 -
Hi,
Using:
CONFIG += link_pkgconfig PKGCONFIG += opencv
Should be enough