QT静态编译的问题
在网上搜了一下,按他的命令执行时出错
set QMAKESPEC=win32-msvc2008
configure -platform win32-msvc2008 -release -no-exceptions -opensource -static -fast -qt-sql-sqlite -plugin-sql-sqlite -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -no-webkit -qt-style-windowsxp -qt-style-windowsvista
结果:
D:\Qt\4.6.3\include\QtCore/../../src/corelib/tools/qvector.h(313) : whil
e compiling class-template member function 'int __thiscall QVector<struct QMakeP
roject::ScopeBlock>::alignOfTypedData(void) const'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
del qbitarray.obj
找不到 D:\Qt\4.6.3\qmake\qbitarray.obj
del qbuffer.obj
找不到 D:\Qt\4.6.3\qmake\qbuffer.obj
del qcryptographichash.obj
找不到 D:\Qt\4.6.3\qmake\qcryptographichash.obj
del qlinkedlist.obj
找不到 D:\Qt\4.6.3\qmake\qlinkedlist.obj
del qfsfileengine.obj
找不到 D:\Qt\4.6.3\qmake\qfsfileengine.obj
del qfsfileengine_iterator.obj
找不到 D:\Qt\4.6.3\qmake\qfsfileengine_iterator.obj
del qbytearray.obj
找不到 D:\Qt\4.6.3\qmake\qbytearray.obj
del qvsnprintf.obj
找不到 D:\Qt\4.6.3\qmake\qvsnprintf.obj
del qbytearraymatcher.obj
找不到 D:\Qt\4.6.3\qmake\qbytearraymatcher.obj
del qdatetime.obj
找不到 D:\Qt\4.6.3\qmake\qdatetime.obj
del qdir.obj
找不到 D:\Qt\4.6.3\qmake\qdir.obj
del qdiriterator.obj
找不到 D:\Qt\4.6.3\qmake\qdiriterator.obj
del qfile.obj
找不到 D:\Qt\4.6.3\qmake\qfile.obj
del qtemporaryfile.obj
找不到 D:\Qt\4.6.3\qmake\qtemporaryfile.obj
del qabstractfileengine.obj
找不到 D:\Qt\4.6.3\qmake\qabstractfileengine.obj
del qfsfileengine_win.obj
找不到 D:\Qt\4.6.3\qmake\qfsfileengine_win.obj
del qfsfileengine_iterator_win.obj
找不到 D:\Qt\4.6.3\qmake\qfsfileengine_iterator_win.obj
del qfileinfo.obj
找不到 D:\Qt\4.6.3\qmake\qfileinfo.obj
del qglobal.obj
找不到 D:\Qt\4.6.3\qmake\qglobal.obj
del qhash.obj
找不到 D:\Qt\4.6.3\qmake\qhash.obj
del qiodevice.obj
找不到 D:\Qt\4.6.3\qmake\qiodevice.obj
del qlist.obj
找不到 D:\Qt\4.6.3\qmake\qlist.obj
del qlocale.obj
找不到 D:\Qt\4.6.3\qmake\qlocale.obj
del qmalloc.obj
找不到 D:\Qt\4.6.3\qmake\qmalloc.obj
del qmap.obj
找不到 D:\Qt\4.6.3\qmake\qmap.obj
del qregexp.obj
找不到 D:\Qt\4.6.3\qmake\qregexp.obj
del qtextcodec.obj
找不到 D:\Qt\4.6.3\qmake\qtextcodec.obj
del qutfcodec.obj
找不到 D:\Qt\4.6.3\qmake\qutfcodec.obj
del qstring.obj
找不到 D:\Qt\4.6.3\qmake\qstring.obj
del qstringlist.obj
找不到 D:\Qt\4.6.3\qmake\qstringlist.obj
del qtextstream.obj
找不到 D:\Qt\4.6.3\qmake\qtextstream.obj
del qdatastream.obj
找不到 D:\Qt\4.6.3\qmake\qdatastream.obj
del quuid.obj
找不到 D:\Qt\4.6.3\qmake\quuid.obj
del qvector.obj
找不到 D:\Qt\4.6.3\qmake\qvector.obj
del qsettings.obj
找不到 D:\Qt\4.6.3\qmake\qsettings.obj
del qlibraryinfo.obj
找不到 D:\Qt\4.6.3\qmake\qlibraryinfo.obj
del qvariant.obj
找不到 D:\Qt\4.6.3\qmake\qvariant.obj
del qurl.obj
找不到 D:\Qt\4.6.3\qmake\qurl.obj
del qsettings_win.obj
找不到 D:\Qt\4.6.3\qmake\qsettings_win.obj
del qmetatype.obj
找不到 D:\Qt\4.6.3\qmake\qmetatype.obj
del project.obj
找不到 D:\Qt\4.6.3\qmake\project.obj
del main.obj
找不到 D:\Qt\4.6.3\qmake\main.obj
del makefile.obj
找不到 D:\Qt\4.6.3\qmake\makefile.obj
del unixmake.obj
找不到 D:\Qt\4.6.3\qmake\unixmake.obj
del unixmake2.obj
找不到 D:\Qt\4.6.3\qmake\unixmake2.obj
del mingw_make.obj
找不到 D:\Qt\4.6.3\qmake\mingw_make.obj
del option.obj
找不到 D:\Qt\4.6.3\qmake\option.obj
del winmakefile.obj
找不到 D:\Qt\4.6.3\qmake\winmakefile.obj
del projectgenerator.obj
找不到 D:\Qt\4.6.3\qmake\projectgenerator.obj
del property.obj
找不到 D:\Qt\4.6.3\qmake\property.obj
del meta.obj
找不到 D:\Qt\4.6.3\qmake\meta.obj
del makefiledeps.obj
找不到 D:\Qt\4.6.3\qmake\makefiledeps.obj
del metamakefile.obj
找不到 D:\Qt\4.6.3\qmake\metamakefile.obj
del xmloutput.obj
找不到 D:\Qt\4.6.3\qmake\xmloutput.obj
del borland_bmake.obj
找不到 D:\Qt\4.6.3\qmake\borland_bmake.obj
del msvc_nmake.obj
找不到 D:\Qt\4.6.3\qmake\msvc_nmake.obj
del msvc_dsp.obj
找不到 D:\Qt\4.6.3\qmake\msvc_dsp.obj
del msvc_vcproj.obj
找不到 D:\Qt\4.6.3\qmake\msvc_vcproj.obj
del msvc_objectmodel.obj
找不到 D:\Qt\4.6.3\qmake\msvc_objectmodel.obj
del symmake.obj
找不到 D:\Qt\4.6.3\qmake\symmake.obj
del symmake_abld.obj
找不到 D:\Qt\4.6.3\qmake\symmake_abld.obj
del symmake_sbsv2.obj
找不到 D:\Qt\4.6.3\qmake\symmake_sbsv2.obj
del initprojectdeploy_symbian.obj
找不到 D:\Qt\4.6.3\qmake\initprojectdeploy_symbian.obj
del registry.obj
找不到 D:\Qt\4.6.3\qmake\registry.obj
del epocroot.obj
找不到 D:\Qt\4.6.3\qmake\epocroot.obj
del pbuilder_pbx.obj
找不到 D:\Qt\4.6.3\qmake\pbuilder_pbx.obj
del qxmlstream.obj
找不到 D:\Qt\4.6.3\qmake\qxmlstream.obj
del qxmlutils.obj
找不到 D:\Qt\4.6.3\qmake\qxmlutils.obj
del qnumeric.obj
找不到 D:\Qt\4.6.3\qmake\qnumeric.obj
del vc60.pdb
找不到 D:\Qt\4.6.3\qmake\vc60.pdb
del vc70.pdb
找不到 D:\Qt\4.6.3\qmake\vc70.pdb
del qmake.pdb
找不到 D:\Qt\4.6.3\qmake\qmake.pdb
del qmake.ilk
找不到 D:\Qt\4.6.3\qmake\qmake.ilk
del qmake.tds
找不到 D:\Qt\4.6.3\qmake\qmake.tds
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cl -c -Foproject.obj -W3 -nologo -O2 -I. -Igenerators -Igenerators\uni
x -Igenerators\win32 -Igenerators\mac -Igenerators\symbian -ID:\Qt\4.6.3\includ
e -ID:\Qt\4.6.3\include\QtCore -ID:\Qt\4.6.3\include -ID:\Qt\4.6.3\include\QtCo
re -ID:\Qt\4.6.3\src\corelib\global -ID:\Qt\4.6.3\src\corelib\xml -ID:\Qt\4.6
.3\mkspecs\win32-msvc2008 -ID:\Qt\4.6.3\tools\shared -DQT_NO_TEXTCODEC -DQT_N
O_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DU
NICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_
NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED -DQMAKE_OPEN
SOURCE_EDITION project.cpp
project.cpp
D:\Qt\4.6.3\include\QtCore/../../src/corelib/tools/qvector.h(315) : error C2065:
'__alignof' : undeclared identifier
D:\Qt\4.6.3\include\QtCore/../../src/corelib/tools/qvector.h(313) : whil
e compiling class-template member function 'int __thiscall QVector<struct QMakeP
roject::ScopeBlock>::alignOfTypedData(void) const'
D:\Qt\4.6.3\include\QtCore/../../src/corelib/tools/qvector.h(315) : error C2275:
'QVector<struct QMakeProject::ScopeBlock>::Data' : illegal use of this type as
an expression
D:\Qt\4.6.3\include\QtCore/../../src/corelib/tools/qvector.h(313) : whil
e compiling class-template member function 'int __thiscall QVector<struct QMakeP
roject::ScopeBlock>::alignOfTypedData(void) const'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
Building qmake failed, return code 2