2013-04-05 144 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. 

而那些你提出的要求。

相关问题