go!go!go!
全部博文(188)
分类: LINUX
2013-11-05 11:01:55
转自:
`gcc -print-prog-name=cc1plus` -v
`g++ -print-prog-name=cc1plus` -v
例如,CentOS 6.3 64bit 下,`g++ -print-prog-name=cc1plus` -v 的运行结果是:
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backward
/usr/local/include
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include
/usr/include
End of search list.
即,默认include路径是
/usr/include/c++/4.4.6
/usr/include/c++/4.4.6/x86_64-redhat-linux
/usr/include/c++/4.4.6/backward
/usr/local/include
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include
/usr/include