codeblocks误把警告当错误的解决办法
C/C++ code
?
#include
using namespace std;
int main()
{
cout << “Hello world!” << endl;
int a;
return 0;
}
/home/orighost/work/Demo2/main.cpp|8|警告: 未使用的变量‘a’ [-Wunused-variable]|
||=== Build finished: 1 errors, 0 warnings ===|
把compiler flags(右键build option中)的值改为:
-g -Wall