构建Qt时编译器错误

时间:2013-10-22 07:38:54

标签: c++ qt visual-c++ visual-studio-2013 nmake

我正在尝试自己构建Qt。我检查了一切,现在想运行configure。 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.

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

1 个答案:

答案 0 :(得分:8)

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

检查vc ++是否使用了定义的PATH个变量(至少INCLUDELIBPATH两个。)

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

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

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

相关问题