How to compile without warnings being treated as errors?

Saurabh Verma picture Saurabh Verma · Jul 19, 2012 · Viewed 177.6k times · Source

The problem is that the same code that compiles well on Windows, is unable to compile on Ubuntu. Every time I get this error:

cc1: warnings being treated as errors

Now, it's big code base and I don't like fix all the warnings.

Is there any way I can compile successfully in spite of the warnings?

Answer

Daniel Fischer picture Daniel Fischer · Jul 19, 2012

Sure, find where -Werror is set and remove that flag. Then warnings will be only warnings.