MinGW中的头文件路径


这里帮助理解MinGW中,哪些是C++的头文件路径,哪些是C的头文件路径,通常C++程序设置头文件路径的话需要将C++的头文件路径设到C头文件路径的前面。
比如C头文件目录%MINGW_PATH%/include下有头文件,里面有strcpy等c函数的声明。
C++头文件目录%MINGW_PATH%/lib/gcc/mingw32/4.4.0/include/c++下有头文件,里面有std::string类的声明。
//家目录
MINGW_PATH=D:/MinGW
 
//C头文件目录
C_INCLUDE_PATH=%MINGW_PATH%/include;%MINGW_PATH%/lib/gcc/mingw32/3.4.5/include
 
//C++头文件目录
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%
 
//在QTSDK带的MinGW中C++头文件目录均在lib文件夹下
CPLUS_INCLUDE_PATH=%MINGW_PATH%/lib/gcc/mingw32/4.4.0/include/c++;%C_INCLUDE_PATH%
 
//库目录
LIBRARY_PATH=%MINGW_PATH%/lib;%MINGW_PATH%/lib/gcc/mingw32/3.4.5 
 
//可执行程序目录
PATH=%MINGW_PATH%/bin;%MINGW_PATH%/libexec/gcc/mingw32/3.4.5