[Solved] VScode Run C++ File Error: fatal error:opencv2\core.hpp:No such file or diretory

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

//C header file directory

//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

//library directory

//executable program directory

Read More: