为VS2005和32位构建Qt失败



尽管

configure -platform win32-msvc2005 -arch x86

运行良好,nmake立即出现致命错误:

Qt has not been ported to this architecture

我在64位Windows7机器上构建。你知道为什么会这样吗?

Generating Code...
        cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT
 -DQT_UIC -DQT_UIC_CPP_GENERATOR -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST
_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYS
TEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NODLL
-I"." -I"." -I"cpp" -I"." -I"......include" -I"......includeQtCore" -I"......includeQtXml" -I"....xml" -I".
.....mkspecswin32-msvc2005" -Fotmpobjrelease_shared @C:UsersronenAppDataLocalTempnm60BD.tmp
cppextractimages.cpp
cppwritedeclaration.cpp
cppwriteicondata.cpp
cppwriteicondeclaration.cpp
cppwriteiconinitialization.cpp
cppwriteincludes.cpp
cppwriteinitialization.cpp
Generating Code...
        link /LIBPATH:"c:devQt480srctoolsbootstraprelease" /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYST
EM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='
6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"tmpobjrelease_shareduic.intermedia
te.manifest" /OUT:......binuic.exe @C:UsersronenAppDataLocalTempnm7547.tmp
        mt.exe -nologo -manifest "tmpobjrelease_shareduic.intermediate.manifest" -outputresource:......binuic.exe
;1
        cd srcwinmain && "C:Program Files (x86)Microsoft Visual Studio 8VCBINnmake.exe" -f Makefile
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.
        "C:Program Files (x86)Microsoft Visual Studio 8VCBINnmake.exe" -f Makefile.Debug all
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.
        cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 -w34100 -w34189 -GR -EHsc -DQT_THREAD_SUPPORT -DUNICODE -DWIN32 -
DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILD
ER -D_USE_MATH_DEFINES -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I"....include" -I"
tmp" -I"....includeQtCore" -I"c:devQt480includeqtmain" -I"tmprccdebug_shared" -I"tmp" -I"....includeActiveQt
" -I"tmpmocdebug_shared" -I"....mkspecswin32-msvc2005" -Fotmpobjdebug_shared @C:UsersronenAppDataLocalTemp
nm7813.tmp
qtmain_win.cpp
c:devqt480includeqtcore../../src/corelib/arch/qatomic_arch.h(96) : fatal error C1189: #error :  "Qt has not been po
rted to this architecture"
NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 8VCBINcl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 8VCBINnmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

您不需要提供arch参数。从qatomic_arch.h的来源来看,它似乎跳过了QT_ARCH_WINDOWS部分。所以尝试在没有-arch的情况下进行构建。还要确保您是从32位Visual Studio命令提示符构建的(假设VS2005有一个64位编译器——我不记得它是否有)。如果使用VS2008进行构建,则需要根据需要启动32位或64位Visual Studio命令提示符。

尝试使用minigw构建它。我认为当你表演nmake时,这会对你有所帮助。我对与nmake的建筑有意见。尝试在VS2008>的更高版本上构建它

最新更新