如何编译没有警告被视为错误? [英] How to compile without warnings being treated as errors?
本文介绍了如何编译没有警告被视为错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问题是,同样的code在Windows编译好,是无法编译在Ubuntu上。每次我得到这个错误:
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
现在,它的大code基础,我不喜欢固定所有的警告。
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?
推荐答案
感谢您的所有有用的建议。我终于确信有我的code没有警告,但同样是从sqlite3的得到这样的警告:
Thanks for all the helpful suggestions. I finally made sure that there are no warnings in my code, but again was getting this warning from sqlite3:
Assuming signed overflow does not occur when assuming that (X - c) <= X is always true
这是我固定加入以下CFLAG:
which I fixed by adding the following CFLAG:
-fno-strict-overflow
这篇关于如何编译没有警告被视为错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文