0

在我看来,gcc 的 mingw wersion 忽略了 CFLAGS 环境变量。我对吗?怎么可能修好?

我做了以下工作:

创建简单的 test.c 文件

int main(int argc, char** argv) {
    int a;
    return 0;
}

并运行 mingw bash 提示符

$ export CFLAGS="-Wall"
$ gcc test.c    <-- no warnings
$ gcc test.c -Wall 
$  ... warning: unused variable 'a'
4

2 回答 2

2

CFLAGS it's not an environment variable required or used by the gcc suite, you can find more about gcc and environment variables here.

于 2013-06-01T11:07:28.837 回答
0

Yeah, sorry, it seems makefile option

于 2013-06-01T11:06:49.253 回答