且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

禁用警告被视为错误(cc1.exe)

更新时间:2022-10-15 17:29:59

您需要删除 -Werror CFLAGS CPPFLAGS 等;这些通常是在Makefile或build脚本中设置的。



但是,我强烈建议修复实际的警告,这样会产生更稳定和无错误的代码。

I am developing a brew app. When compiling the app to get MOD file, I am continuously getting this error

cc1.exe: warnings being treated as errors

I want to disable this warning. I have googled it, and many says disabling -werror will help but I don't know how to do that. The compiler is CodeSourcery ARM.

You need to remove -Werror from CFLAGS, CPPFLAGS etc.; these are usually set in Makefile's or build scripts.

However, I'd strongly advice to fix the actual warnings instead, which will produce more stable and error-free code.