本文共 800 字,大约阅读时间需要 2 分钟。
$ gcc -v -x c -E /dev/nullUsing built-in specs.[...]#include "..." search starts here:#include <...> search starts here: /usr/lib/gcc/x86_64-linux-gnu/4.8/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/includeEnd of search list.[...]The GCC flags in order of specification:
-v
- Enable verbose mode. In the preprocessor's case, print the final form of the include path, among other things.-x c
- Tells GCC that the input is to be treated as C source code. To find the G++ include path, substitute -x c++
. You should be able to do the same for all the other languages supported by your GCC installation, assuming those languages support the concept of preprocessing.-E
- Stop after preprocessing (it's an empty source file, after all).转载地址:http://vwhji.baihongyu.com/