cc1plus: all warnings being treated as errors

来源:互联网 发布:ace.min.js是什么 编辑:程序博客网 时间:2024/05/29 02:29

简介

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

参考

http://stackoverflow.com/questions/8132594/disable-werror-ini-configure-file

1 0
原创粉丝点击