Chinaunix首页 | 论坛 | 博客
  • 博客访问: 76579
  • 博文数量: 19
  • 博客积分: 1930
  • 博客等级: 上尉
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-09 15:17
个人简介

忆往昔之可鉴,知来者之可追

文章分类

全部博文(19)

分类: 其他平台

2018-11-14 19:42:41

1、include search path
By default, the preprocessor looks for header files included by the quote form of the directive #include "file" first relative to the directory of the current file, and then in a preconfigured list of standard system directories. For example, if /usr/include/sys/stat.h contains #include "types.h", GCC looks for types.h first in /usr/include/sys, then in its usual search path.

For the angle-bracket form #include , the preprocessor’s default behavior is to look only in the standard system directories. The exact search directory list depends on the target system, how GCC is configured, and where it is installed. You can find the default search directory list for your version of CPP by invoking it with the -v option.

For example, on tx2

shell: cpp -v /dev/null -o /dev/null

#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/aarch64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/aarch64-linux-gnu/5/include-fixed
 /usr/include/aarch64-linux-gnu
 /usr/include
End of search list.

阅读(1264) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~