我正在尝试自己建立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.
有人知道如何解决这个问题吗?
编译器本身 PATH 变量是不够的,它需要知道include文件和库的位置。
PATH
检查vc++是否具有 路径 它使用定义的变量(至少两个 INCLUDE 和 LIBPATH ).
路径
INCLUDE
LIBPATH
如果没有,您有两种选择:
跑 configure 从…起 开发人员命令提示符 (您可以在Visual Studio Tools程序组中找到它)。
configure
从任何命令提示符窗口运行 VcVars32.bat 批处理文件(或 VsVars32.bat )位于 Common7\Tools VS安装目录下的文件夹。
VcVars32.bat
VsVars32.bat
Common7\Tools