forked from hellogcc/100-gcc-tips
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
135a78f
commit 54cdec1
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 打印头文件搜索路径 | ||
|
||
## 例子 | ||
|
||
$ gcc -v foo.c | ||
... | ||
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" | ||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../x86_64-linux-gnu/include" | ||
#include "..." search starts here: | ||
#include <...> search starts here: | ||
/usr/lib/gcc/x86_64-linux-gnu/4.6/include | ||
/usr/local/include | ||
/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed | ||
/usr/include/x86_64-linux-gnu | ||
/usr/include | ||
End of search list. | ||
... | ||
|
||
## 技巧 | ||
|
||
如上所示,使用`-v`选项可以打印出gcc搜索头文件的路径和顺序。当然,也可以使用`-###`选项 | ||
|
||
## 贡献者 | ||
|
||
xmj | ||
|