QT5 Alpha WINDOWS编译
2012-04-07 09:14
141 查看
WINDOWS安装正常流程:
从http://releases.qt-project.org/qt5.0/alpha/获取源码包。
从perl.org上下载perl,自动添加perl路径的环境变量。(此步是因为configure.bat脚本解析需要)
下载mingw-get-inst-20111118.exe,安装最新的mingw 4.6.1(C、C++、msys),把mingw的路径增加到系统PATH环境变量中。(此步一是因为configure.bat脚本解析需要编译器,另外是为了支持gcc的命令行参数-fno-keep-inline-dllexport,QTSDK 1.2自带的mingw 4.4不支持此参数)
将python.exe的路径增加到系统环境变量中。(此步是因为qtjsbackend需要)
重启WINDOWS。
mingw-get install mintty
cd qtbase
configure -debug -opensource -confirm-license -nomake examples -nomake tests -fast
将-developer-build改成-debug,因为这样-developer-build生成的库对qt creator不友好。
mingw32-make,qtbase编译成功。
cd qtjsbackend
qmake
mingw32-make,qtjsbackend编译成功。
cd qtxmlpatterns
qmake
mingw32-make,qtxmlpatterns编译成功。
cd qtdeclarative(依赖qtjsbackend和xmlpatterns),把qtdeclarative\modules\qt_declarative.pri中QT.qtdeclarative.DEFINES全删了。那些宏是因为QML把类名又从QDeclarative改成QQML了,然后定义了一串宏为了兼容之前使用QML的旧代码,不是QT5哦。QT5 alpha又没有旧代码。
qmake
mingw32-make,编译成功。
cd qt3d(依赖qtdeclarative)
qmake
mingw32-make,编译成功。
在qmake时,会把模块下面modules\xxx.pri拷贝到qtbase\mkspecs\modules下。
=======================================================================================================
遇到的问题:
编译qtbase时出现:
问题1:
原因:一开始使用QTSDK的mingw,不支持-fno-keep-inline-dllexport。下载新的mingw解决。
编译qtjsbackend时出现:
问题1:
原因:python路径没有添加。
编译qtdeclarative时出现:
问题1:
解决方法:
把qtdeclarative\modules\qt_declarative.pri中QT.qtdeclarative.DEFINES全删了。
问题2:
位置:qtdeclarative\src\imports\testlib\main.cpp
解决方法:
将-DQDeclarativeXX都删去,即可编译。
编译qt3d时出现:
解决方法:把QtDeclarative的pri文件中那一串宏删去,问题自然解决。
参考文档:
http://qt-project.org/wiki/Building_Qt_5_from_Git
从http://releases.qt-project.org/qt5.0/alpha/获取源码包。
从perl.org上下载perl,自动添加perl路径的环境变量。(此步是因为configure.bat脚本解析需要)
下载mingw-get-inst-20111118.exe,安装最新的mingw 4.6.1(C、C++、msys),把mingw的路径增加到系统PATH环境变量中。(此步一是因为configure.bat脚本解析需要编译器,另外是为了支持gcc的命令行参数-fno-keep-inline-dllexport,QTSDK 1.2自带的mingw 4.4不支持此参数)
将python.exe的路径增加到系统环境变量中。(此步是因为qtjsbackend需要)
重启WINDOWS。
mingw-get install mintty
cd qtbase
configure -debug -opensource -confirm-license -nomake examples -nomake tests -fast
将-developer-build改成-debug,因为这样-developer-build生成的库对qt creator不友好。
mingw32-make,qtbase编译成功。
cd qtjsbackend
qmake
mingw32-make,qtjsbackend编译成功。
cd qtxmlpatterns
qmake
mingw32-make,qtxmlpatterns编译成功。
cd qtdeclarative(依赖qtjsbackend和xmlpatterns),把qtdeclarative\modules\qt_declarative.pri中QT.qtdeclarative.DEFINES全删了。那些宏是因为QML把类名又从QDeclarative改成QQML了,然后定义了一串宏为了兼容之前使用QML的旧代码,不是QT5哦。QT5 alpha又没有旧代码。
qmake
mingw32-make,编译成功。
cd qt3d(依赖qtdeclarative)
qmake
mingw32-make,编译成功。
在qmake时,会把模块下面modules\xxx.pri拷贝到qtbase\mkspecs\modules下。
=======================================================================================================
遇到的问题:
编译qtbase时出现:
问题1:
g++ -c -fno-keep-inline-dllexport -g -frtti -fexceptions -mthreads -Wall -DUNICO DE -DQT_LARGEFILE_SUPPORT -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIA NT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_THRE AD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NODLL - I"..\..\..\include" -I"..\..\..\include\QtCore" -I"..\..\..\include\QtCore\5.0.0 " -I"..\..\..\include\QtCore\5.0.0\QtCore" -I"..\..\3rdparty\zlib" -I"..\..\..\m kspecs\win32-g++" -o tmp\obj\debug_shared\qlatincodec.o ..\..\corelib\codecs\qla tincodec.cpp cc1plus.exe: error: unrecognized command line option "-fno-keep-inline-dllexport " mingw32-make[2]: *** [tmp/obj/debug_shared/qlatincodec.o] Error 1 mingw32-make[2]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtbase /src/tools/bootstrap' mingw32-make[1]: *** [debug] Error 2 mingw32-make[1]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtbase /src/tools/bootstrap' |
编译qtjsbackend时出现:
问题1:
process_begin: CreateProcess(NULL, python G:/qt-everywhere-opensource-src-5.0.0/ qtjsbackend/src/v8/../3rdparty/v8/tools/js2c.py generated-debug/libraries.cpp CO RE off G:/qt-everywhere-opensource-src-5.0.0/qtjsbackend/src/v8/../3rdparty/v8/s rc/macros.py ..\3rdparty\v8\src\runtime.js ..\3rdparty\v8\src\v8natives.js ..\3r dparty\v8\src\array.js ..\3rdparty\v8\src\string.js ..\3rdparty\v8\src\uri.js .. \3rdparty\v8\src\math.js ..\3rdparty\v8\src\messages.js ..\3rdparty\v8\src\apina tives.js ..\3rdparty\v8\src\date.js ..\3rdparty\v8\src\regexp.js ..\3rdparty\v8\ src\json.js ..\3rdparty\v8\src\liveedit-debugger.js ..\3rdparty\v8\src\mirror-de bugger.js ..\3rdparty\v8\src\debug-debugger.js, ...) failed. make (e=2): mingw32-make[3]: *** [generated-debug/libraries.cpp] Error 2 mingw32-make[3]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtjsba ckend/src/v8' mingw32-make[2]: *** [debug-install] Error 2 mingw32-make[2]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtjsba ckend/src/v8' mingw32-make[1]: *** [sub-v8-install_subtargets-ordered] Error 2 mingw32-make[1]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtjsba ckend/src' mingw32-make: *** [module-qtjsbackend-src-install_subtargets] Error 2 |
编译qtdeclarative时出现:
问题1:
windres -i qmldbg_qtquick2d_resource.rc -o debug\qmldbg_qtquick2d_resource_res.o --include-dir=. -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_PLUGIN -DQT_QUIC K_LIB -DQDeclarativeAbstractAnimation=QQuickAbstractAnimation -DQDeclarativeAbst ractBinding=QQmlAbstractBinding -DQDeclarativeAbstractBoundSignal=QQmlAbstractBo undSignal -DQDeclarativeAccessible=QQmlAccessible -DQDeclarativeAccessibleAttach ed=QQmlAccessibleAttached -DQDeclarativeAccessorProperties=QQmlAccessorPropertie s -DQDeclarativeAction=QQuickAction -DQDeclarativeActionEvent=QQuickActionEvent -DQDeclarativeAnimationGroup=QQuickAnimationGroup -DQDeclarativeAnimationPropert yUpdater=QQuickAnimationPropertyUpdater -DQDeclarativeApplication=QQuickApplicat ion -DQDeclarativeBehavior=QQuickBehavior -DQDeclarativeBind=QQuickBind -DQDecla rativeBinding=QQmlBinding -DQDeclarativeBindingProfiler=QQmlBindingProfiler -DQD eclarativeBoundSignal=QQmlBoundSignal -DQDeclarativeBuiltinFunctions=QQmlBuiltin Functions -DQDeclarativeBulkValueAnimator=QQuickBulkValueAnimator -DQDeclarative ChangeSet=QQuickChangeSet -DQDeclarativeCleanup=QQmlCleanup -DQDeclarativeColorA nimation=QQuickColorAnimation -DQDeclarativeColorValueType=QQmlColorValueType -D QDeclarativeCompiledData=QQmlCompiledData -DQDeclarativeCompiler=QQmlCompiler -D QDeclarativeCompilerTypes=QQmlCompilerTypes -DQDeclarativeComponent=QQmlComponen t -DQDeclarativeComponentAttached=QQmlComponentAttached -DQDeclarativeComponentP rivate=QQmlComponentPrivate -DQDeclarativeConnections=QQuickConnections -DQDecla rativeContext=QQmlContext -DQDeclarativeContextData=QQmlContextData -DQDeclarati veCurve=QQuickCurve -DQDeclarativeCustomParser=QQmlCustomParser -DQDeclarativeCu stomParserNode=QQmlCustomParserNode -DQDeclarativeCustomParserProperty=QQmlCusto mParserProperty -DQDeclarativeData=QQmlData -DQDeclarativeDataBlob=QQmlDataBlob -DQDeclarativeDataLoader=QQmlDataLoader -DQDeclarativeDebug=QQmlDebug -DQDeclara tiveDebugClient=QQmlDebugClient -DQDeclarativeDebugConnection=QQmlDebugConnectio n -DQDeclarativeDebugContextReference=QQmlDebugContextReference -DQDeclarativeDe bugData=QQmlDebugData -DQDeclarativeDebugEngineReference=QQmlDebugEngineReferenc e -DQDeclarativeDebugEnginesQuery=QQmlDebugEnginesQuery -DQDeclarativeDebugExpre ssionQuery=QQmlDebugExpressionQuery -DQDeclarativeDebugFileReference=QQmlDebugFi leReference -DQDeclarativeDebuggingEnabler=QQmlDebuggingEnabler -DQDeclarativeDe bugHelper=QQmlDebugHelper -DQDeclarativeDebugObjectExpressionWatch=QQmlDebugObje ctExpressionWatch -DQDeclarativeDebugObjectQuery=QQmlDebugObjectQuery -DQDeclara tiveDebugObjectReference=QQmlDebugObjectReference -DQDeclarativeDebugPropertyRef erence=QQmlDebugPropertyReference -DQDeclarativeDebugPropertyWatch=QQmlDebugProp ertyWatch -DQDeclarativeDebugQuery=QQmlDebugQuery -DQDeclarativeDebugRootContext Query=QQmlDebugRootContextQuery -DQDeclarativeDebugServer=QQmlDebugServer -DQDec larativeDebugServerConnection=QQmlDebugServerConnection -DQDeclarativeDebugServi ce=QQmlDebugService -DQDeclarativeDebugTrace=QQmlDebugTrace -DQDeclarativeDebugW atch=QQmlDebugWatch -DQDeclarativeEasingValueType=QQmlEasingValueType -DQDeclara tiveEngine=QQmlEngine -DQDeclarativeEngineDebug=QQmlEngineDebug -DQDeclarativeEn gineDebugService=QQmlEngineDebugService -DQDeclarativeEnginePrivate=QQmlEnginePr ivate -DQDeclarativeError=QQmlError -DQDeclarativeExpression=QQmlExpression -DQD eclarativeExpressionPrivate=QQmlExpressionPrivate -DQDeclarativeExtensionInterfa ce=QQmlExtensionInterface -DQDeclarativeExtensionPlugin=QQmlExtensionPlugin -DQD eclarativeFontLoader=QQuickFontLoader -DQDeclarativeFontValueType=QQmlFontValueT ype -DQDeclarativeGuard=QQmlGuard -DQDeclarativeImageProvider=QQmlImageProvider -DQDeclarativeImports=QQmlImports -DQDeclarativeIncubationController=QQmlIncubat ionController -DQDeclarativeIncubator=QQmlIncubator -DQDeclarativeInfo=QQmlInfo -DQDeclarativeInspector=QQmlInspector -DQDeclarativeInspectorInterface=QQmlInspe ctorInterface -DQDeclarativeInspectorService=QQmlInspectorService -DQDeclarative Instruction=QQmlInstruction -DQDeclarativeJS=QQmlJS -DQDeclarativeListAccessor=Q QuickListAccessor -DQDeclarativeListCompositor=QQuickListCompositor -DQDeclarati veListModel=QQuickListModel -DQDeclarativeListModelWorkerAgent=QQuickListModelWo rkerAgent -DQDeclarativeListProperty=QQmlListProperty -DQDeclarativeListReferenc e=QQmlListReference -DQDeclarativeLocale=QQmlLocale -DQDeclarativeMatrix4x4Value Type=QQmlMatrix4x4ValueType -DQDeclarativeMetaType=QQmlMetaType -DQDeclarativeNe tworkAccessManagerFactory=QQmlNetworkAccessManagerFactory -DQDeclarativeNotifier =QQmlNotifier -DQDeclarativeNullableValue=QQmlNullableValue -DQDeclarativeNumber Animation=QQuickNumberAnimation -DQDeclarativeOpenMetaObject=QQmlOpenMetaObject -DQDeclarativeOpenMetaObjectType=QQmlOpenMetaObjectType -DQDeclarativePackage=QQ uickPackage -DQDeclarativeParser=QQmlParser -DQDeclarativeParserStatus=QQmlParse rStatus -DQDeclarativePath=QQuickPath -DQDeclarativePathArc=QQuickPathArc -DQDec larativePathAttribute=QQuickPathAttribute -DQDeclarativePathCatmullRomCurve=QQui ckPathCatmullRomCurve -DQDeclarativePathCubic=QQuickPathCubic -DQDeclarativePath Element=QQuickPathElement -DQDeclarativePathInterpolator=QQuickPathInterpolator -DQDeclarativePathLine=QQuickPathLine -DQDeclarativePathPercent=QQuickPathPercen t -DQDeclarativePathQuad=QQuickPathQuad -DQDeclarativePathSvg=QQuickPathSvg -DQD eclarativePauseAnimation=QQuickPauseAnimation -DQDeclarativePixmap=QQuickPixmap -DQDeclarativePointFValueType=QQmlPointFValueType -DQDeclarativePointValueType=Q QmlPointValueType -DQDeclarativePool=QQmlPool -DQDeclarativePrivate=QQmlPrivate -DQDeclarativeProperty=QQmlProperty -DQDeclarativePropertyAnimation=QQuickProper tyAnimation -DQDeclarativePropertyCache=QQmlPropertyCache -DQDeclarativeProperty Changes=QQuickPropertyChanges -DQDeclarativePropertyMap=QQmlPropertyMap -DQDecla rativePropertyPrivate=QQmlPropertyPrivate -DQDeclarativePropertyValueInterceptor =QQmlPropertyValueInterceptor -DQDeclarativePropertyValueSource=QQmlPropertyValu eSource -DQDeclarativeQmldirData=QQmlQmldirData -DQDeclarativeQtQuick1Module=QQm lQtQuick1Module -DQDeclarativeQtQuick2Module=QQmlQtQuick2Module -DQDeclarativeQu aternionValueType=QQmlQuaternionValueType -DQDeclarativeRectFValueType=QQmlRectF ValueType -DQDeclarativeRectValueType=QQmlRectValueType -DQDeclarativeRewrite=QQ mlRewrite -DQDeclarativeRotationAnimation=QQuickRotationAnimation -DQDeclarative Script=QQmlScript -DQDeclarativeScriptAction=QQuickScriptAction -DQDeclarativeSc riptBlob=QQmlScriptBlob -DQDeclarativeStringConverters=QQmlStringConverters -DQD eclarativeScriptData=QQmlScriptData -DQDeclarativeScriptString=QQmlScriptString -DQDeclarativeSizeFValueType=QQmlSizeFValueType -DQDeclarativeSizeValueType=QQml SizeValueType -DQDeclarativeSmoothedAnimation=QQuickSmoothedAnimation -DQDeclara tiveSpringAnimation=QQuickSpringAnimation -DQDeclarativeState=QQuickState -DQDec larativeStateChangeScript=QQuickStateChangeScript -DQDeclarativeStateGroup=QQuic kStateGroup -DQDeclarativeStateOperation=QQuickStateOperation -DQDeclarativeStyl edText=QQuickStyledText -DQDeclarativeStyledTextImgTag=QQuickStyledTextImgTag -D QDeclarativeSvgParser=QQmlSvgParser -DQDeclarativeSystemPalette=QQuickSystemPale tte -DQDeclarativeTextureFactory=QQuickTextureFactory -DQDeclarativeTimeLine=QQu ickTimeLine -DQDeclarativeTimeLineCallback=QQuickTimeLineCallback -DQDeclarative TimeLineObject=QQuickTimeLineObject -DQDeclarativeTimeLineValue=QQuickTimeLineVa lue -DQDeclarativeTimer=QQuickTimer -DQDeclarativeTransition=QQuickTransition -D QDeclarativeTransitionManager=QQuickTransitionManager -DQDeclarativeType=QQmlTyp e -DQDeclarativeTypeData=QQmlTypeData -DQDeclarativeTypeLoader=QQmlTypeLoader -D QDeclarativeTypesExtensionInterface=QQmlTypesExtensionInterface -DQDeclarativeV8 Function=QQmlV8Function -DQDeclarativeValueType=QQmlValueType -DQDeclarativeValu eTypeFactory=QQmlValueTypeFactory -DQDeclarativeVector2DValueType=QQmlVector2DVa lueType -DQDeclarativeVector3dAnimation=QQuickVector3dAnimation -DQDeclarativeVe ctor3DValueType=QQmlVector3DValueType -DQDeclarativeVector4DValueType=QQmlVector 4DValueType -DQDeclarativeVME=QQmlVME -DQDeclarativeVMEMetaObject=QQmlVMEMetaObj ect -DQDeclarativeVMETypes=QQmlVMETypes -DQDeclarativeWorkerScript=QQuickWorkerS cript -DQDeclarativeXmlListModel=QQuickXmlListModel -DQT_QML_LIB -DQT_NETWORK_LI B -DQT_GUI_LIB -DV8_SHARED -DUSING_V8_SHARED -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HA VE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 命令行太长。 windres: preprocessing failed. mingw32-make[5]: *** [debug/qmldbg_qtquick2d_resource_res.o] Error 1 mingw32-make[5]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src/plugins/qmltooling/qmldbg_qtquick2' mingw32-make[4]: *** [debug-install] Error 2 mingw32-make[4]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src/plugins/qmltooling/qmldbg_qtquick2' mingw32-make[3]: *** [sub-qmldbg_qtquick2-install_subtargets] Error 2 mingw32-make[3]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src/plugins/qmltooling' mingw32-make[2]: *** [sub-qmltooling-install_subtargets] Error 2 mingw32-make[2]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src/plugins' mingw32-make[1]: *** [sub-plugins-install_subtargets-ordered] Error 2 mingw32-make[1]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src' mingw32-make: *** [module-qtdeclarative-src-install_subtargets] Error 2 |
把qtdeclarative\modules\qt_declarative.pri中QT.qtdeclarative.DEFINES全删了。
问题2:
g++ -c -fno-keep-inline-dllexport -g -frtti -fexceptions -mthreads -Wall -DUNICO DE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_PLUGIN -DQT_QMLTEST_LIB -DQT_QUICK_LIB - DQDeclarativeAbstractAnimation=QQuickAbstractAnimation -DQDeclarativeAbstractBin ding=QQmlAbstractBinding -DQDeclarativeAbstractBoundSignal=QQmlAbstractBoundSign al -DQDeclarativeAccessible=QQmlAccessible -DQDeclarativeAccessibleAttached=QQml AccessibleAttached -DQDeclarativeAccessorProperties=QQmlAccessorProperties -DQDe clarativeAction=QQuickAction -DQDeclarativeActionEvent=QQuickActionEvent -DQDecl arativeAnimationGroup=QQuickAnimationGroup -DQDeclarativeAnimationPropertyUpdate r=QQuickAnimationPropertyUpdater -DQDeclarativeApplication=QQuickApplication -DQ DeclarativeBehavior=QQuickBehavior -DQDeclarativeBind=QQuickBind -DQDeclarativeB inding=QQmlBinding -DQDeclarativeBindingProfiler=QQmlBindingProfiler -DQDeclarat iveBoundSignal=QQmlBoundSignal -DQDeclarativeBuiltinFunctions=QQmlBuiltinFunctio ns -DQDeclarativeBulkValueAnimator=QQuickBulkValueAnimator -DQDeclarativeChangeS et=QQuickChangeSet -DQDeclarativeCleanup=QQmlCleanup -DQDeclarativeColorAnimatio n=QQuickColorAnimation -DQDeclarativeColorValueType=QQmlColorValueType -DQDeclar ativeCompiledData=QQmlCompiledData -DQDeclarativeCompiler=QQmlCompiler -DQDeclar ativeCompilerTypes=QQmlCompilerTypes -DQDeclarativeComponent=QQmlComponent -DQDe clarativeComponentAttached=QQmlComponentAttached -DQDeclarativeComponentPrivate= QQmlComponentPrivate -DQDeclarativeConnections=QQuickConnections -DQDeclarativeC ontext=QQmlContext -DQDeclarativeContextData=QQmlContextData -DQDeclarativeCurve =QQuickCurve -DQDeclarativeCustomParser=QQmlCustomParser -DQDeclarativeCustomPar serNode=QQmlCustomParserNode -DQDeclarativeCustomParserProperty=QQmlCustomParser Property -DQDeclarativeData=QQmlData -DQDeclarativeDataBlob=QQmlDataBlob -DQDecl arativeDataLoader=QQmlDataLoader -DQDeclarativeDebug=QQmlDebug -DQDeclarativeDeb ugClient=QQmlDebugClient -DQDeclarativeDebugConnection=QQmlDebugConnection -DQDe clarativeDebugContextReference=QQmlDebugContextReference -DQDeclarativeDebugData =QQmlDebugData -DQDeclarativeDebugEngineReference=QQmlDebugEngineReference -DQDe clarativeDebugEnginesQuery=QQmlDebugEnginesQuery -DQDeclarativeDebugExpressionQu ery=QQmlDebugExpressionQuery -DQDeclarativeDebugFileReference=QQmlDebugFileRefer ence -DQDeclarativeDebuggingEnabler=QQmlDebuggingEnabler -DQDeclarativeDebugHelp er=QQmlDebugHelper -DQDeclarativeDebugObjectExpressionWatch=QQmlDebugObjectExpre ssionWatch -DQDeclarativeDebugObjectQuery=QQmlDebugObjectQuery -DQDeclarativeDeb ugObjectReference=QQmlDebugObjectReference -DQDeclarativeDebugPropertyReference= QQmlDebugPropertyReference -DQDeclarativeDebugPropertyWatch=QQmlDebugPropertyWat ch -DQDeclarativeDebugQuery=QQmlDebugQuery -DQDeclarativeDebugRootContextQuery=Q QmlDebugRootContextQuery -DQDeclarativeDebugServer=QQmlDebugServer -DQDeclarativ eDebugServerConnection=QQmlDebugServerConnection -DQDeclarativeDebugService=QQml DebugService -DQDeclarativeDebugTrace=QQmlDebugTrace -DQDeclarativeDebugWatch=QQ mlDebugWatch -DQDeclarativeEasingValueType=QQmlEasingValueType -DQDeclarativeEng ine=QQmlEngine -DQDeclarativeEngineDebug=QQmlEngineDebug -DQDeclarativeEngineDeb ugService=QQmlEngineDebugService -DQDeclarativeEnginePrivate=QQmlEnginePrivate - DQDeclarativeError=QQmlError -DQDeclarativeExpression=QQmlExpression -DQDeclarat iveExpressionPrivate=QQmlExpressionPrivate -DQDeclarativeExtensionInterface=QQml ExtensionInterface -DQDeclarativeExtensionPlugin=QQmlExtensionPlugin -DQDeclarat iveFontLoader=QQuickFontLoader -DQDeclarativeFontValueType=QQmlFontValueType -DQ DeclarativeGuard=QQmlGuard -DQDeclarativeImageProvider=QQmlImageProvider -DQDecl arativeImports=QQmlImports -DQDeclarativeIncubationController=QQmlIncubationCont roller -DQDeclarativeIncubator=QQmlIncubator -DQDeclarativeInfo=QQmlInfo -DQDecl arativeInspector=QQmlInspector -DQDeclarativeInspectorInterface=QQmlInspectorInt erface -DQDeclarativeInspectorService=QQmlInspectorService -DQDeclarativeInstruc tion=QQmlInstruction -DQDeclarativeJS=QQmlJS -DQDeclarativeListAccessor=QQuickLi stAccessor -DQDeclarativeListCompositor=QQuickListCompositor -DQDeclarativeListM odel=QQuickListModel -DQDeclarativeListModelWorkerAgent=QQuickListModelWorkerAge nt -DQDeclarativeListProperty=QQmlListProperty -DQDeclarativeListReference=QQmlL istReference -DQDeclarativeLocale=QQmlLocale -DQDeclarativeMatrix4x4ValueType=QQ mlMatrix4x4ValueType -DQDeclarativeMetaType=QQmlMetaType -DQDeclarativeNetworkAc cessManagerFactory=QQmlNetworkAccessManagerFactory -DQDeclarativeNotifier=QQmlNo tifier -DQDeclarativeNullableValue=QQmlNullableValue -DQDeclarativeNumberAnimati on=QQuickNumberAnimation -DQDeclarativeOpenMetaObject=QQmlOpenMetaObject -DQDecl arativeOpenMetaObjectType=QQmlOpenMetaObjectType -DQDeclarativePackage=QQuickPac kage -DQDeclarativeParser=QQmlParser -DQDeclarativeParserStatus=QQmlParserStatus -DQDeclarativePath=QQuickPath -DQDeclarativePathArc=QQuickPathArc -DQDeclarativ ePathAttribute=QQuickPathAttribute -DQDeclarativePathCatmullRomCurve=QQuickPathC atmullRomCurve -DQDeclarativePathCubic=QQuickPathCubic -DQDeclarativePathElement =QQuickPathElement -DQDeclarativePathInterpolator=QQuickPathInterpolator -DQDecl arativePathLine=QQuickPathLine -DQDeclarativePathPercent=QQuickPathPercent -DQDe clarativePathQuad=QQuickPathQuad -DQDeclarativePathSvg=QQuickPathSvg -DQDeclarat ivePauseAnimation=QQuickPauseAnimation -DQDeclarativePixmap=QQuickPixmap -DQDecl arativePointFValueType=QQmlPointFValueType -DQDeclarativePointValueType=QQmlPoin tValueType -DQDeclarativePool=QQmlPool -DQDeclarativePrivate=QQmlPrivate -DQDecl arativeProperty=QQmlProperty -DQDeclarativePropertyAnimation=QQuickPropertyAnima tion -DQDeclarativePropertyCache=QQmlPropertyCache -DQDeclarativePropertyChanges =QQuickPropertyChanges -DQDeclarativePropertyMap=QQmlPropertyMap -DQDeclarativeP ropertyPrivate=QQmlPropertyPrivate -DQDeclarativePropertyValueInterceptor=QQmlPr opertyValueInterceptor -DQDeclarativePropertyValueSource=QQmlPropertyValueSource -DQDeclarativeQmldirData=QQmlQmldirData -DQDeclarativeQtQuick1Module=QQmlQtQuic k1Module -DQDeclarativeQtQuick2Module=QQmlQtQuick2Module -DQDeclarativeQuaternio nValueType=QQmlQuaternionValueType -DQDeclarativeRectFValueType=QQmlRectFValueTy pe -DQDeclarativeRectValueType=QQmlRectValueType -DQDeclarativeRewrite=QQmlRewri te -DQDeclarativeRotationAnimation=QQuickRotationAnimation -DQDeclarativeScript= QQmlScript -DQDeclarativeScriptAction=QQuickScriptAction -DQDeclarativeScriptBlo b=QQmlScriptBlob -DQDeclarativeStringConverters=QQmlStringConverters -DQDeclarat iveScriptData=QQmlScriptData -DQDeclarativeScriptString=QQmlScriptString -DQDecl arativeSizeFValueType=QQmlSizeFValueType -DQDeclarativeSizeValueType=QQmlSizeVal ueType -DQDeclarativeSmoothedAnimation=QQuickSmoothedAnimation -DQDeclarativeSpr ingAnimation=QQuickSpringAnimation -DQDeclarativeState=QQuickState -DQDeclarativ eStateChangeScript=QQuickStateChangeScript -DQDeclarativeStateGroup=QQuickStateG roup -DQDeclarativeStateOperation=QQuickStateOperation -DQDeclarativeStyledText= QQuickStyledText -DQDeclarativeStyledTextImgTag=QQuickStyledTextImgTag -DQDeclar ativeSvgParser=QQmlSvgParser -DQDeclarativeSystemPalette=QQuickSystemPalette -DQ DeclarativeTextureFactory=QQuickTextureFactory -DQDeclarativeTimeLine=QQuickTime Line -DQDeclarativeTimeLineCallback=QQuickTimeLineCallback -DQDeclarativeTimeLin eObject=QQuickTimeLineObject -DQDeclarativeTimeLineValue=QQuickTimeLineValue -DQ DeclarativeTimer=QQuickTimer -DQDeclarativeTransition=QQuickTransition -DQDeclar ativeTransitionManager=QQuickTransitionManager -DQDeclarativeType=QQmlType -DQDe clarativeTypeData=QQmlTypeData -DQDeclarativeTypeLoader=QQmlTypeLoader -DQDeclar ativeTypesExtensionInterface=QQmlTypesExtensionInterface -DQDeclarativeV8Functio n=QQmlV8Function -DQDeclarativeValueType=QQmlValueType -DQDeclarativeValueTypeFa ctory=QQmlValueTypeFactory -DQDeclarativeVector2DValueType=QQmlVector2DValueType -DQDeclarativeVector3dAnimation=QQuickVector3dAnimation -DQDeclarativeVector3DV alueType=QQmlVector3DValueType -DQDeclarativeVector4DValueType=QQmlVector4DValue Type -DQDeclarativeVME=QQmlVME -DQDeclarativeVMEMetaObject=QQmlVMEMetaObject -DQ DeclarativeVMETypes=QQmlVMETypes -DQDeclarativeWorkerScript=QQuickWorkerScript - DQDeclarativeXmlListModel=QQuickXmlListModel -DQT_QML_LIB -DQT_TESTLIB_LIB -DQT_ TESTCASE_BUILDDIR=\"G:/qt-everywhere-opensource-src-5.0.0/qtdeclarative/src/impo rts/testlib\" -DQT_NETWORK_LIB -DQT_GUI_LIB -DV8_SHARED -DUSING_V8_SHARED -DQT_C ORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_S SE2 -I"..\..\..\..\qtbase\include\QtCore\5.0.0" -I"..\..\..\..\qtbase\include\Qt Core\5.0.0\QtCore" -I"..\..\..\..\qtbase\include\QtCore" -I"..\..\..\..\qtbase\i nclude\QtV8\5.0.0" -I"..\..\..\..\qtbase\include\QtV8\5.0.0\QtV8" -I"..\..\..\.. \qtbase\include\QtV8" -I"..\..\..\..\qtbase\include\QtGui" -I"..\..\..\..\qtbase \include\QtNetwork" -I"..\..\..\..\qtbase\include\QtTest" -I"..\..\..\..\qtbase\ include\QtQml\5.0.0" -I"..\..\..\..\qtbase\include\QtQml\5.0.0\QtQml" -I"..\..\. .\..\qtbase\include" -I"..\..\..\..\qtbase\include\QtQml" -I"..\..\..\include" - I"..\..\..\include\QtDeclarative" -I"..\..\..\..\qtbase\include\QtQuick" -I"..\. .\..\include\QtQuickTest\5.0.0" -I"..\..\..\include\QtQuickTest\5.0.0\QtQuickTes t" -I"..\..\..\include\QtQuickTest" -I"..\..\..\..\qtbase\mkspecs\win32-g++" -I" debug" -I"..\..\..\..\qtbase\mkspecs\default" -o debug\main.o main.cpp g++: error: unrecognized option '-QDeclarativeWorkerScript=QQuickWorkerScript' mingw32-make[4]: *** [debug/main.o] Error 1 mingw32-make[4]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src/imports/testlib' mingw32-make[3]: *** [debug] Error 2 mingw32-make[3]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src/imports/testlib' mingw32-make[2]: *** [sub-testlib-make_default] Error 2 mingw32-make[2]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src/imports' mingw32-make[1]: *** [sub-imports-make_default-ordered] Error 2 mingw32-make[1]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qtdecl arative/src' mingw32-make: *** [module-qtdeclarative-src-make_default] Error 2 |
解决方法:
将-DQDeclarativeXX都删去,即可编译。
编译qt3d时出现:
windres -i Qt3DQuickd_resource.rc -o debug\Qt3DQuickd_resource_res.o --include-d ir=. -DQT_SHARED -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_MAKEDLL -DQT_NO_CAST_TO_A SCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MAT H_DEFINES -DQT_BUILD_QT3D_QUICK_LIB -DQT_NO_EGL -DQT_DLL -DQT_QUICK_LIB -DQDecla rativeAbstractAnimation=QQuickAbstractAnimation -DQDeclarativeAbstractBinding=QQ mlAbstractBinding -DQDeclarativeAbstractBoundSignal=QQmlAbstractBoundSignal -DQD eclarativeAccessible=QQmlAccessible -DQDeclarativeAccessibleAttached=QQmlAccessi bleAttached -DQDeclarativeAccessorProperties=QQmlAccessorProperties -DQDeclarati veAction=QQuickAction -DQDeclarativeActionEvent=QQuickActionEvent -DQDeclarative AnimationGroup=QQuickAnimationGroup -DQDeclarativeAnimationPropertyUpdater=QQuic kAnimationPropertyUpdater -DQDeclarativeApplication=QQuickApplication -DQDeclara tiveBehavior=QQuickBehavior -DQDeclarativeBind=QQuickBind -DQDeclarativeBinding= QQmlBinding -DQDeclarativeBindingProfiler=QQmlBindingProfiler -DQDeclarativeBoun dSignal=QQmlBoundSignal -DQDeclarativeBuiltinFunctions=QQmlBuiltinFunctions -DQD eclarativeBulkValueAnimator=QQuickBulkValueAnimator -DQDeclarativeChangeSet=QQui ckChangeSet -DQDeclarativeCleanup=QQmlCleanup -DQDeclarativeColorAnimation=QQuic kColorAnimation -DQDeclarativeColorValueType=QQmlColorValueType -DQDeclarativeCo mpiledData=QQmlCompiledData -DQDeclarativeCompiler=QQmlCompiler -DQDeclarativeCo mpilerTypes=QQmlCompilerTypes -DQDeclarativeComponent=QQmlComponent -DQDeclarati veComponentAttached=QQmlComponentAttached -DQDeclarativeComponentPrivate=QQmlCom ponentPrivate -DQDeclarativeConnections=QQuickConnections -DQDeclarativeContext= QQmlContext -DQDeclarativeContextData=QQmlContextData -DQDeclarativeCurve=QQuick Curve -DQDeclarativeCustomParser=QQmlCustomParser -DQDeclarativeCustomParserNode =QQmlCustomParserNode -DQDeclarativeCustomParserProperty=QQmlCustomParserPropert y -DQDeclarativeData=QQmlData -DQDeclarativeDataBlob=QQmlDataBlob -DQDeclarative DataLoader=QQmlDataLoader -DQDeclarativeDebug=QQmlDebug -DQDeclarativeDebugClien t=QQmlDebugClient -DQDeclarativeDebugConnection=QQmlDebugConnection -DQDeclarati veDebugContextReference=QQmlDebugContextReference -DQDeclarativeDebugData=QQmlDe bugData -DQDeclarativeDebugEngineReference=QQmlDebugEngineReference -DQDeclarati veDebugEnginesQuery=QQmlDebugEnginesQuery -DQDeclarativeDebugExpressionQuery=QQm lDebugExpressionQuery -DQDeclarativeDebugFileReference=QQmlDebugFileReference -D QDeclarativeDebuggingEnabler=QQmlDebuggingEnabler -DQDeclarativeDebugHelper=QQml DebugHelper -DQDeclarativeDebugObjectExpressionWatch=QQmlDebugObjectExpressionWa tch -DQDeclarativeDebugObjectQuery=QQmlDebugObjectQuery -DQDeclarativeDebugObjec tReference=QQmlDebugObjectReference -DQDeclarativeDebugPropertyReference=QQmlDeb ugPropertyReference -DQDeclarativeDebugPropertyWatch=QQmlDebugPropertyWatch -DQD eclarativeDebugQuery=QQmlDebugQuery -DQDeclarativeDebugRootContextQuery=QQmlDebu gRootContextQuery -DQDeclarativeDebugServer=QQmlDebugServer -DQDeclarativeDebugS erverConnection=QQmlDebugServerConnection -DQDeclarativeDebugService=QQmlDebugSe rvice -DQDeclarativeDebugTrace=QQmlDebugTrace -DQDeclarativeDebugWatch=QQmlDebug Watch -DQDeclarativeEasingValueType=QQmlEasingValueType -DQDeclarativeEngine=QQm lEngine -DQDeclarativeEngineDebug=QQmlEngineDebug -DQDeclarativeEngineDebugServi ce=QQmlEngineDebugService -DQDeclarativeEnginePrivate=QQmlEnginePrivate -DQDecla rativeError=QQmlError -DQDeclarativeExpression=QQmlExpression -DQDeclarativeExpr essionPrivate=QQmlExpressionPrivate -DQDeclarativeExtensionInterface=QQmlExtensi onInterface -DQDeclarativeExtensionPlugin=QQmlExtensionPlugin -DQDeclarativeFont Loader=QQuickFontLoader -DQDeclarativeFontValueType=QQmlFontValueType -DQDeclara tiveGuard=QQmlGuard -DQDeclarativeImageProvider=QQmlImageProvider -DQDeclarative Imports=QQmlImports -DQDeclarativeIncubationController=QQmlIncubationController -DQDeclarativeIncubator=QQmlIncubator -DQDeclarativeInfo=QQmlInfo -DQDeclarative Inspector=QQmlInspector -DQDeclarativeInspectorInterface=QQmlInspectorInterface -DQDeclarativeInspectorService=QQmlInspectorService -DQDeclarativeInstruction=QQ mlInstruction -DQDeclarativeJS=QQmlJS -DQDeclarativeListAccessor=QQuickListAcces sor -DQDeclarativeListCompositor=QQuickListCompositor -DQDeclarativeListModel=QQ uickListModel -DQDeclarativeListModelWorkerAgent=QQuickListModelWorkerAgent -DQD eclarativeListProperty=QQmlListProperty -DQDeclarativeListReference=QQmlListRefe rence -DQDeclarativeLocale=QQmlLocale -DQDeclarativeMatrix4x4ValueType=QQmlMatri x4x4ValueType -DQDeclarativeMetaType=QQmlMetaType -DQDeclarativeNetworkAccessMan agerFactory=QQmlNetworkAccessManagerFactory -DQDeclarativeNotifier=QQmlNotifier -DQDeclarativeNullableValue=QQmlNullableValue -DQDeclarativeNumberAnimation=QQui ckNumberAnimation -DQDeclarativeOpenMetaObject=QQmlOpenMetaObject -DQDeclarative OpenMetaObjectType=QQmlOpenMetaObjectType -DQDeclarativePackage=QQuickPackage -D QDeclarativeParser=QQmlParser -DQDeclarativeParserStatus=QQmlParserStatus -DQDec larativePath=QQuickPath -DQDeclarativePathArc=QQuickPathArc -DQDeclarativePathAt tribute=QQuickPathAttribute -DQDeclarativePathCatmullRomCurve=QQuickPathCatmullR omCurve -DQDeclarativePathCubic=QQuickPathCubic -DQDeclarativePathElement=QQuick PathElement -DQDeclarativePathInterpolator=QQuickPathInterpolator -DQDeclarative PathLine=QQuickPathLine -DQDeclarativePathPercent=QQuickPathPercent -DQDeclarati vePathQuad=QQuickPathQuad -DQDeclarativePathSvg=QQuickPathSvg -DQDeclarativePaus eAnimation=QQuickPauseAnimation -DQDeclarativePixmap=QQuickPixmap -DQDeclarative PointFValueType=QQmlPointFValueType -DQDeclarativePointValueType=QQmlPointValueT ype -DQDeclarativePool=QQmlPool -DQDeclarativePrivate=QQmlPrivate -DQDeclarative Property=QQmlProperty -DQDeclarativePropertyAnimation=QQuickPropertyAnimation -D QDeclarativePropertyCache=QQmlPropertyCache -DQDeclarativePropertyChanges=QQuick PropertyChanges -DQDeclarativePropertyMap=QQmlPropertyMap -DQDeclarativeProperty Private=QQmlPropertyPrivate -DQDeclarativePropertyValueInterceptor=QQmlPropertyV alueInterceptor -DQDeclarativePropertyValueSource=QQmlPropertyValueSource -DQDec larativeQmldirData=QQmlQmldirData -DQDeclarativeQtQuick1Module=QQmlQtQuick1Modul e -DQDeclarativeQtQuick2Module=QQmlQtQuick2Module -DQDeclarativeQuaternionValueT ype=QQmlQuaternionValueType -DQDeclarativeRectFValueType=QQmlRectFValueType -DQD eclarativeRectValueType=QQmlRectValueType -DQDeclarativeRewrite=QQmlRewrite -DQD eclarativeRotationAnimation=QQuickRotationAnimation -DQDeclarativeScript=QQmlScr ipt -DQDeclarativeScriptAction=QQuickScriptAction -DQDeclarativeScriptBlob=QQmlS criptBlob -DQDeclarativeStringConverters=QQmlStringConverters -DQDeclarativeScri ptData=QQmlScriptData -DQDeclarativeScriptString=QQmlScriptString -DQDeclarative SizeFValueType=QQmlSizeFValueType -DQDeclarativeSizeValueType=QQmlSizeValueType -DQDeclarativeSmoothedAnimation=QQuickSmoothedAnimation -DQDeclarativeSpringAnim ation=QQuickSpringAnimation -DQDeclarativeState=QQuickState -DQDeclarativeStateC hangeScript=QQuickStateChangeScript -DQDeclarativeStateGroup=QQuickStateGroup -D QDeclarativeStateOperation=QQuickStateOperation -DQDeclarativeStyledText=QQuickS tyledText -DQDeclarativeStyledTextImgTag=QQuickStyledTextImgTag -DQDeclarativeSv gParser=QQmlSvgParser -DQDeclarativeSystemPalette=QQuickSystemPalette -DQDeclara tiveTextureFactory=QQuickTextureFactory -DQDeclarativeTimeLine=QQuickTimeLine -D QDeclarativeTimeLineCallback=QQuickTimeLineCallback -DQDeclarativeTimeLineObject =QQuickTimeLineObject -DQDeclarativeTimeLineValue=QQuickTimeLineValue -DQDeclara tiveTimer=QQuickTimer -DQDeclarativeTransition=QQuickTransition -DQDeclarativeTr ansitionManager=QQuickTransitionManager -DQDeclarativeType=QQmlType -DQDeclarati veTypeData=QQmlTypeData -DQDeclarativeTypeLoader=QQmlTypeLoader -DQDeclarativeTy pesExtensionInterface=QQmlTypesExtensionInterface -DQDeclarativeV8Function=QQmlV 8Function -DQDeclarativeValueType=QQmlValueType -DQDeclarativeValueTypeFactory=Q QmlValueTypeFactory -DQDeclarativeVector2DValueType=QQmlVector2DValueType -DQDec larativeVector3dAnimation=QQuickVector3dAnimation -DQDeclarativeVector3DValueTyp e=QQmlVector3DValueType -DQDeclarativeVector4DValueType=QQmlVector4DValueType -D QDeclarativeVME=QQmlVME -DQDeclarativeVMEMetaObject=QQmlVMEMetaObject -DQDeclara tiveVMETypes=QQmlVMETypes -DQDeclarativeWorkerScript=QQuickWorkerScript -DQDecla rativeXmlListModel=QQuickXmlListModel -DQT_QML_LIB -DQT_QT3D_LIB -DQT_NETWORK_LI B -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HA VE_MMXEXT -DQT_HAVE_SSE2 命令行太长。 windres: preprocessing failed. mingw32-make[3]: *** [debug/Qt3DQuickd_resource_res.o] Error 1 mingw32-make[3]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qt3d/s rc/quick3d' mingw32-make[2]: *** [debug-install] Error 2 mingw32-make[2]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qt3d/s rc/quick3d' mingw32-make[1]: *** [sub-quick3d-install_subtargets-ordered] Error 2 mingw32-make[1]: Leaving directory `G:/qt-everywhere-opensource-src-5.0.0/qt3d/s rc' mingw32-make: *** [module-qt3d-src-install_subtargets] Error 2 |
参考文档:
http://qt-project.org/wiki/Building_Qt_5_from_Git
相关文章推荐
- Windows下静态编译Qt5
- windows下QT编译使用boost
- Windows下QT中用C++调用Python之二 - 编译BUG处理
- qt4:windows下编译qt 4.3.2
- QT的编译安装(以4.2.3 for windows为例) [打印本页]
- QT项目在VS上的编译,windows.h与winsock2.h存在多个重定义的问题的解决方法。
- Windows 下Qt的编译过程
- Linux 下重新编译Windows下生成的Qt工程
- 在windows下用Qt creator + mingw编译protobuf源码生成静态链接库的方法
- windows qt 编译opengl出现 error: undefined reference to `_imp__glXXX@XX'
- windows-qt 使用mingw编译c++boost并使用
- 用qt编译Android应用(windows和Linux)
- Windows下编译Qt的Mysql驱动
- windows下OpenCV的编译与配置过程(Qt)
- Windows下编译qt-material
- Windows环境下设置Qt编译环境 - 关于Qt的静态链接库的配置和生成方法
- 如何在Windows上编译64位QT
- Windows下用VC与QT编译MPI程序入门
- Windows QT工程编译出错
- Qt使用虚拟机windows共享目录调用第三方库编译不成功