当前位置:编程学习 > wap >>

请教一个关于Makefile的问题

下载了qt-everywhere-opensource-src.4.8.0
在编译过程中出现了如下错误
cc1plus: warnings being treated as errors
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h: In instantiation of ‘WTF::PassOwnPtr<JSC::Yarr::ByteDisjunction>’:
../../../Source/JavaScriptCore/yarr/YarrInterpreter.h:341:   instantiated from here
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h:73: warning: lowering visibility of ‘WTF::PassOwnPtr<U> WTF::adoptPtr(U*) [with U = U, T = JSC::Yarr::ByteDisjunction]’ to match its type
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h: In instantiation of ‘WTF::PassOwnPtr<JSC::Yarr::BytecodePattern>’:
../../../Source/JavaScriptCore/yarr/YarrInterpreter.cpp:1520:   instantiated from here
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h:73: warning: lowering visibility of ‘WTF::PassOwnPtr<U> WTF::adoptPtr(U*) [with U = U, T = JSC::Yarr::BytecodePattern]’ to match its type
make[1]: *** [obj/release/YarrInterpreter.o] Error 1
make[1]: Leaving directory `/opt/wubin/WebKit/WebKitBuild/Release/JavaScriptCore'
make: *** [sub-JavaScriptCore-JavaScriptCore-pro-make_default-ordered] Error 2

我知道造成编译中断的原因是因为编译时设置了-werror选项,Makefile中的CXXFLAGS也确实有这个选项.
直接删除makefile中的该选项肯定是可以的,但是有很多工程中的makefile都有该选项,如果手动删除的话效率很低.

我也知道Makefile是通过运行configure脚本由qmake按照.pro文件的配置生成的.
现在问题就是我想在自动生成makefile文件的时候就不包含-Werror选项,我想知道的是更改哪里的配置可以达到这个目的? --------------------编程问答-------------------- CONFIG += warn_off
或者
QMAKE_CXXFLAGS -= -Werror
QMAKE_CFLAGS -= -Werror
或者
QMAKE_CXXFLAGS += -w
QMAKE_CFLAGS += -w
不知道行不行?
补充:移动开发 ,  Qt
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,