Run c++ file with vscode error: fatal error: opencv2\core.hpp:No such file or diretory
The main error is that the corresponding header file cannot be found in the header file directory!
C header file directory %MINGW_PATH%/include under the header file, which has strcpy and other c function declaration.
C++ header file directory %MINGW_PATH%/lib/gcc/mingw32/4.4.0/include/c++ under the header file, which has the declaration of std::string class.
//home directory
MINGW_PATH=D:/MinGW
//C header file directory
C_INCLUDE_PATH=%MINGW_PATH%/include;%MINGW_PATH%/lib/gcc/mingw32/3.4.5/include
//C++ header file directory
CPLUS_INCLUDE_PATH=%MINGW_PATH%/include/c++/3.4.5;%MINGW_PATH%/include/c++/3.4.5/mingw32;%MINGW_PATH%/include/c++/3.4.5/backward;% C_INCLUDE_PATH%
//In QTSDK with MinGW the C++ header files are in the lib folder
CPLUS_INCLUDE_PATH=%MINGW_PATH%/lib/gcc/mingw32/4.4.0/include/c++;%C_INCLUDE_PATH%
//library directory
LIBRARY_PATH=%MINGW_PATH%/lib;%MINGW_PATH%/lib/gcc/mingw32/3.4.5
//executable program directory
PATH=%MINGW_PATH%/bin;%MINGW_PATH%/libexec/gcc/mingw32/3.4.5
Read More:
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- SLAMBook2 in ch3 code run fatal error: Eigen/Core: No such file or directory
- [Solved] src/delly.h:8:42: fatal error: boost/graph/adjacency_list.hpp: No such file or directory
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- C++: fatal error: variant: No such file or directory
- [Solved] utils.c:33:18: fatal error: zlib.h: No such file or directory
- [Solved] 1.fatal error: NvInfer.h: No such file or directory
- [Solved] MSYS2+ fatal error: zlib.h: There is no such file or directory
- fatal error: libusb.h: No such file or directory [How to Solve]
- [Solved] fatal error: Eigen/Geometry: No such file or directory
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- [Solved] Opencv Error: Error: Assertion failed (data) in cv::Mat::at, file … mat.inl.hpp, line 897(Accessed pixels of non-existent matrix)
- [Solved] fatal error: bits/libc-header-start.h: No such file or directory
- [Solved] ROS fatal error: alsa/asoundlib. h: There is no such directory or file
- Opencv Can not Find opencv2/gpu/gpu.hpp [How to Solve]
- Mac Vscode C++ Customize Header File Error: linker command failed
- error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
- [Solved] Linux Start jar Error: nohup: failed to run command ‘java‘: No such file or directory