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.
Is there a way i could exclude only one file from this in the linux build system
In my particular case I needed to remove
-Werror-implicit-function-declaration
. Totally agree with your advice, but sometimes you just want to compile someone else's code, which used to compile under older versions of gcc and there are simply too many of these warnings to fix in a reasonable time.