Opencv header files not found for a c++ project in eclipse editor for windows 11 platform


This Content is from Stack Overflow. Question asked by Encipher

I like to write a opencv program in c++. I installed ECLIPSE IDE, Mingw-w64, cmake, opencv. I also went through Installing and using OpenCV 3.2 with Eclipse and MinGW on Windows 10 and Installation of OpenCV 3.2 for Eclipse in Windows 10. I am using windows 11. I downloaded the code to run to my computer.

I got error in opencv header file.

The two header files

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

Could not reconized

10:38:28 **** Incremental Build of configuration Debug for project Image ****
Info: Internal Builder is used for build
g++ “-IC:opencv_srcMingw_buildinclude” -O0 -g3 -Wall -c -fmessage-length=0 -o “srcImage.o” “..srcImage.cpp”
..srcImage.cpp:9:10: fatal error: opencv2/core/core.hpp: No such file or directory
#include <opencv2/core/core.hpp>
compilation terminated.

I adding a screenshot of libraries settings

[enter image description here4

enter image description here

Libraries path C:opencv_srcMingw_buildinstallx64mingwlib

Screenshot of the folder

enter image description here

opencv_src is the folder where I extracted opencv after download it. Mingw_build is the folder that I created and enter the path like that at the time of cmake

enter image description here

The C:opencv_srcMingw_buildopencv2 contains cvconfig.h and opencv_modules.hpp

I am not sure how could I add the header files of opencv so that there is no problem at time of program compilation.


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?