Fatal error: opencv2/core/version.hpp: No such file or directory

I try to install darknet, and when I try to compile with comand make I got this error:

./src/image_opencv.cpp:16:10: fatal error: opencv2/core/version.hpp: No such file or directory
 #include <opencv2/core/version.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:182: recipe for target 'obj/image_opencv.o' failed
make: *** [obj/image_opencv.o] Error 1

I have OpenCV 4.5.5

Hi,

Please note that OpenCV headers is stored at /usr/include/opencv4/ folder.
So please try to add the -I /usr/include/opencv4/ to the Makefile if you are using OpenCV 4.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.