gcc -E 选项
-E 只激活預處理,這個不生成文件,你需要把它重定向到一個輸出文件里面.例子用法:gcc -E hello.c > pianoapan.txtgcc -E hello.c | more慢慢看吧,一個hello word 也要與處理成800行的代碼
-E選項,表示讓gcc只進行“預處理”就行了。 所謂的預處理,就是把程序中的宏展開, 把頭文件的內容展開包含進來等等一些編譯前的預處理操作。預處理結果會顯示到屏幕上,如果需要保存,則得需要重定向
?
?
Why does the C preprocessor in GCC interpret the word linux (small letters) as the constant 1?
test.c:
#include <stdio.h>
int main(void)
{ int linux = 5;return 0;
}
Result of $ gcc -E test.c (stop after the preprocessing stage):
....
int main(void)
{int 1 = 5;return 0;
}
Which -of course- yields an error.
(BTW: There is no #define linux in the stdio.h file.)
總結
- 上一篇: 反向ajax实现
- 下一篇: 毛发移植一般要多少钱