2013-04-05 163 views

回答

1

將它們添加到您的Makefile中作爲CFLAGS。

CFLAGS = -Wall -Werror 
+0

/opt/fontys/soekris/bin/i586-linux-gcc -o mygame -lusb xpatext.c 其中我實際上必須在編譯時插入-wall和-werror cflags像這樣 – badgp 2013-04-06 16:29:17

+0

試試這個:'/ opt/fontys/soekris/bin/i586-linux-gcc -o mygame -lusb -Wall -Werror xpatext.c' – 2013-04-06 17:57:48

2

只要打開終端,輸入是這樣的: gcc -x c -c -Wall -Werror ./path/to/our/fency/c/file.c?通過檢查gcc --helpdocumentation

`-Wall` - turns all warning reporting. 
`-Werror` - tells to make all warnings into errors. 

你可以閱讀一些更多關於GCC標誌:

我增加了幾個標誌:

`-x c` - tells the compiler that it's a C code. 
`-c` - tells the compiler just to compile, no linking. 

而那些你提出的要求。

相關問題