本文介绍了无法使用Microsoft compiller编译Qt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用VS2010编译器构建Qt(4.7.3),但在配置时遇到了问题。

I want to build Qt (4.7.3) with the VS2010 compiler but ran into a problem while configuring.

我使用VS命令行。
我的configure-command看起来像这样:

I’m using the VS-command-shell.My configure-command looks like this:

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

这在启动配置后像一秒钟。出现了什么问题?

This happens like a second after starting configure. What is going wrong?

C:\qt-everywhere-opensource-src-4.7.3\qmake\qbitarray.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.3\qmake\project.obj couldn't be found 
        del qmake_pch.obj
C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake_pch.obj couldn't be found
        del qmake_pch.pch
C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake_pch.pch couldn't be found
        del qsystemlibrary.obj
C:\qt-everywhere-opensource-src-4.7.3\qmake\qsystemlibrary.obj couldn't be found
        del vc60.pdb
C:\qt-everywhere-opensource-src-4.7.3\qmake\vc60.pdb couldn't be found
        del vc70.pdb
C:\qt-everywhere-opensource-src-4.7.3\qmake\vc70.pdb couldn't be found
        del qmake.pdb
C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake.pdb couldn't be found
        del qmake.ilk
C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake.ilk couldn't be found
        del qmake.tds
C:\qt-everywhere-opensource-src-4.7.3\qmake\qmake.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 -Igenerators\unix -I
generators\win32 -Igenerators\mac -Igenerators\symbian  -IC:\qt-everywhere-opens
ource-src-4.7.3\include -IC:\qt-everywhere-opensource-src-4.7.3\include\QtCore
-IC:\qt-everywhere-opensource-src-4.7.3\include -IC:\qt-everywhere-opensource-sr
c-4.7.3\include\QtCore  -IC:\qt-everywhere-opensource-src-4.7.3\src\corelib\glob
al  -IC:\qt-everywhere-opensource-src-4.7.3\src\corelib\xml  -IC:\qt-everywhere-
opensource-src-4.7.3\mkspecs\win32-msvc2008   -IC:\qt-everywhere-opensource-src-
4.7.3\tools\shared  -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.3\include\qtcore\../../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
\VC\BIN\cl.EXE"": return code "0x2"
Stop.
Building qmake failed, return code 2


推荐答案

这是非常愚蠢的我必须自己回答。

It's so stupid I have to answer it myself.

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

The reason was that I didn't have the C++ compiler installed.

我一直以为我这样做,但只用VS2010进行C#开发直到现在。

I always thought I did, but only used VS2010 for C# development up until now.

不要降低b / c我浪费了一些人的时间!什么时候是最后一次这样的愚蠢的事情发生在你的编码?

Don't down-rate b/c I wasted some people's time! When was the last time such a stupid thing happened to you during coding?

这篇关于无法使用Microsoft compiller编译Qt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 05:18