How to compile without warnings being treated as errors?

前端 未结 7 2186
迷失自我
迷失自我 2020-12-07 14:27

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          


        
7条回答
  •  眼角桃花
    2020-12-07 15:04

    You can make all warnings being treated as such using -Wno-error. You can make specific warnings being treated as such by using -Wno-error= where is the name of the warning you don't want treated as an error.

    If you want to entirely disable all warnings, use -w (not recommended).


    Source: http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Warning-Options.html

提交回复
热议问题