如何在 MinGW 中指定包含路径?

How to specify including path in MinGW?

我尝试按照 post:"Building Mesa for windows 7. Mesa 9.1" 的答案中的步骤进行操作。但是当我 运行 scons.py 时,我得到了以下错误:

$ scons.py build=release machine=x86 platform=windows MSVC_VERSION=12.0 libgl-gdi

scons: Reading SConscript files ...

scons: warning: VC version 12.0 not installed.  C/C++ compilers are most likely not set correctly.
 Installed versions are: ['11.0']

File "C:\Users\Administrator\Downloads\Mesa-10.4.4\scons\gallium.py", line 140,
in generate
Checking for MSVC ...  yes
Checking for X11 (x11 xext xdamage xfixes glproto >= 1.4.13)... no
Checking for XCB (x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8)... no
Checking for XF86VIDMODE (xxf86vm)... no
Checking for DRM (libdrm >= 2.4.38)... no
Checking for UDEV (libudev >= 151)... no
warning: LLVM disabled: not building llvmpipe
scons: done reading SConscript files.
scons: Building targets ...
  Compiling src\gallium\targets\libgl-gdi\libgl_gdi.c ...
libgl_gdi.c
src\gallium\targets\libgl-gdi\libgl_gdi.c(37) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
scons: *** [build\windows-x86\gallium\targets\libgl-gdi\libgl_gdi.obj] Error 2
  Compiling src\gallium\state_trackers\wgl\stw_context.c ...
stw_context.c
src\gallium\state_trackers\wgl\stw_context.c(28) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
scons: *** [build\windows-x86\gallium\state_trackers\wgl\stw_context.obj] Error
2
scons: building terminated because of errors.

我正在安装 Visual Studio 2013,所以我将 MSVC_VERSION 的版本从 11.0 更改为 12.0。我尝试添加一个新的环境变量 C_INCLUDE_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC 但它不起作用。不知道如何在 MinGW 上工作。感谢您的帮助。

打开 "VS2012 Tools Command Prompt"、chdir <src_dir> 和 运行 scons。

更新:

运行 从开始菜单 >> 程序 >> Microsoft Visual Studio 2013 >> Visual Studio 工具 >> 命令提示符。

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat 将是 运行。它将设置 INCLUDELIBLIBPATH 和一些其他变量。

运行 scons 在此控制台中 window.