红联Linux门户
Linux帮助

提示cc1plus: all warnings being treated as errors的解决

发布时间:2017-05-05 10:43:26来源:blog.csdn.net/x356982611作者:天已青色等烟雨来
简介
Linux下编译Qt源码时出现这样的提示 cc1plus: all warnings being treated as errors,原因是编译时候gcc配置把警告按错误处理。
 
解决方法
1.在Makefile中找到 -Werror项,删除即可。删除后重新编译。
2.或设置环境变量 c工程设置
export CFLAGS = "-Wno-error"
c++工程设置
export CXXFLAGS = "-Wno-error"
3.或自动化配置工具添加选项 ./config -no-warnings-are-errors
 
参考
提示cc1plus: all warnings being treated as errors的解决
 
本文永久更新地址:http://www.linuxdiyf.com/linux/30529.html