码迷,mamicode.com
首页 > 其他好文 > 详细

查看gcc/g++默认include路径

时间:2016-05-06 09:19:32      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:

转自:http://gcc.gnu.org/ml/gcc-help/2007-09/msg00205.html

 

`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

 

查看gcc/g++默认include路径

标签:

原文地址:http://www.cnblogs.com/lidabo/p/5464375.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!