无法使用Microsoft编译器编译Qt

2022-03-30 00:00:00 qt4 qt c++ visual-studio-2010

我希望使用VS2010编译器生成Qt(4.7.3),但在配置时遇到问题。

我正在使用VS-COMMAND-SHELL。 我的配置命令如下所示:

configure.exe -platform win32-msvc2010 -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support

这在启动配置后一秒钟内就会发生。出了什么问题?

C:qt-everywhere-opensource-src-4.7.3qmakeqbitarray.obj couldn't be found
werden
        del project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw_m
ake.obj  option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj
makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj  borland_bmake.
obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj  msvc_objectmodel.obj msbuil
d_objectmodel.obj symmake.obj initprojectdeploy_symbian.obj  symmake_abld.obj sy
mmake_sbsv2.obj symbiancommon.obj registry.obj epocroot.obj
C:qt-everywhere-opensource-src-4.7.3qmakeproject.obj couldn't be found 
        del qmake_pch.obj
C:qt-everywhere-opensource-src-4.7.3qmakeqmake_pch.obj couldn't be found
        del qmake_pch.pch
C:qt-everywhere-opensource-src-4.7.3qmakeqmake_pch.pch couldn't be found
        del qsystemlibrary.obj
C:qt-everywhere-opensource-src-4.7.3qmakeqsystemlibrary.obj couldn't be found
        del vc60.pdb
C:qt-everywhere-opensource-src-4.7.3qmakevc60.pdb couldn't be found
        del vc70.pdb
C:qt-everywhere-opensource-src-4.7.3qmakevc70.pdb couldn't be found
        del qmake.pdb
C:qt-everywhere-opensource-src-4.7.3qmakeqmake.pdb couldn't be found
        del qmake.ilk
C:qt-everywhere-opensource-src-4.7.3qmakeqmake.ilk couldn't be found
        del qmake.tds
C:qt-everywhere-opensource-src-4.7.3qmakeqmake.tds couldn't be found

Microsoft (R) Program Maintenance Utility, Version 10.00.30319.01
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

        cl -c -Fo./  -W3 -nologo -O2  /MP  -I. -Igenerators -Igeneratorsunix -I
generatorswin32 -Igeneratorsmac -Igeneratorssymbian  -IC:qt-everywhere-opens
ource-src-4.7.3include -IC:qt-everywhere-opensource-src-4.7.3includeQtCore
-IC:qt-everywhere-opensource-src-4.7.3include -IC:qt-everywhere-opensource-sr
c-4.7.3includeQtCore  -IC:qt-everywhere-opensource-src-4.7.3srccorelibglob
al  -IC:qt-everywhere-opensource-src-4.7.3srccorelibxml  -IC:qt-everywhere-
opensource-src-4.7.3mkspecswin32-msvc2008   -IC:qt-everywhere-opensource-src-
4.7.3	oolsshared  -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT
-DQT_NODLL -DQT_NO_STL  -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD
_QMAKE -DQT_NO_THREAD  -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -
DQT_NO_PCRE -DQT_BOOTSTRAPPED  -DQLIBRARYINFO_EPOCROOT -c -Yc -Fpqmake_pch.pch -
TP qmake_pch.h
qmake_pch.h
c:qt-everywhere-opensource-src-4.7.3includeqtcore../../src/corelib/global/qg
lobal.h(45) : fatal error C1083: File (Include) couldn't be opened: "st
ddef.h": No such file or directory
NMAKE : fatal error U1077: ""C:Program Files (x86)Microsoft Visual Studio 10.0
VCBINcl.EXE"": return code "0x2"
Stop.
Building qmake failed, return code 2

解决方案

太蠢了,我不得不自己接。

原因是我没有安装C++编译器。

我一直以为我做到了,但到目前为止只使用VS2010进行C#开发。

别贬低B/C,我浪费了一些人的时间!您上一次在编码过程中遇到如此愚蠢的事情是什么时候?

相关文章