1

我正在尝试自己构建 Qt。我检查了所有内容并想现在运行配置。Visual Studio 2013 编译器位于 PATH 中,但出现此错误

C:\Users\Philipp\Desktop\Qt>configure -developer-build -opensource -nomake examp
les -nomake tests -opengl desktop
+ cd qtbase
+ C:\Users\Philipp\Desktop\Qt\qtbase\configure.bat -top-level -developer-build -
opensource -nomake examples -nomake tests -opengl desktop
Please wait while bootstrapping configure ...
<srcbase> = C:/Users/Philipp/Desktop/Qt/qtbase
<outbase> = C:/Users/Philipp/Desktop/Qt/qtbase

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -c -Yc -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189
-DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPO
NENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT
_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DCOMMERCIAL_VERSION
 -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\5.2.0" -I"..
\..\include\QtCore\5.2.0\QtCore" -I"C:\Users\Philipp\Desktop\Qt\qtbase\tools\sha
red" -I"C:\Users\Philipp\Desktop\Qt\qtbase\mkspecs\win32-msvc2008" -Fpconfigure_
pch.pch -Foconfigure_pch.obj -TP C:\Users\Philipp\Desktop\Qt\qtbase\tools\config
ure\configure_pch.h
configure_pch.h
c:\users\philipp\desktop\qt\qtbase\include\qtcore\../../src/corelib/global/qglob
al.h(46) : fatal error C1083: Cannot open include file: 'stddef.h': No such file
 or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\bin\cl.EXE"' : return code '0x2'
Stop.

有谁知道如何解决这个问题?

4

1 回答 1

8

编译器本身在PATH变量中是不够的,它需要知道包含文件和库的位置。

检查 vc++PATH定义了它使用的变量(至少INCLUDELIBPATH)。

如果没有,您有两个选择:

  • configure开发人员命令提示符运行(您可以在 Visual Studio 工具程序组中找到它)。

  • 从任何命令提示符窗口运行位于VS 安装目录下文件夹中的VcVars32.bat批处理文件(或)。VsVars32.batCommon7\Tools

于 2013-10-22T07:47:29.463 回答