c++ - 更改/设置 MINGWDIR 环境变量到底有什么作用?

标签 c++ boost mingw codeblocks

我正在尝试在 Windows 8 计算机上的 code::blocks 上安装 boost。由于我正在使用的库,我使用 mingw 作为我的编译器。更改/设置 MINGWDIR 环境变量到底有什么作用?这如何帮助我安装 boost?

最佳答案

许多安装、程序,都使用这个变量来快速准确地观察某个环境的准确位置。

例如:

使用您自己的配置批处理文件更容易。 同时安装 Boost 寻找“MINGWDIR”。

下面是一个通用示例。(与 boost 无关)。

@echo off
if [%MINGWDIR%] == [] goto environment_not_set
goto start_develop
:environment_not_set
echo
#############################################################################
echo Please adjust environment variables within this file:
set MINGWDIR=c:\mingw
echo
#############################################################################
rem instead of setting MINGWDIR here you could also set them
rem within the registry using the system control
:start_develop
set PATH=%MINGWDIR%\bin;c:\windows;
echo MINGWDIR = %MINGWDIR%
:end
pause

关于c++ - 更改/设置 MINGWDIR 环境变量到底有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14188009/

相关文章:

c++ - 重载 operator== 但它没有被调用(比较指针?)

c++ - C(++) 中的 sprintf、逗号和点(以及本地化?)

mingw - 使用 Mingw 在 Windows 中应用补丁文件

c++ - 使用 eclipse 和 mingw 设置 SDL2 : SDL_INIT crash

c++ - 如何生成位图头数据然后使用C++写入文件

c++ - 如何在不引起循环依赖的情况下传递然后调用通用回调函数

c++ - 带有boost的C++中的unicode字符串

c++ - 在同一个函数/程序中使用 WebSocket++ 服务器和客户端

windows - MinGW g++ : Multiple definition of vsnprintf when using to_string

c++ - 新的 c++11 for 循环导致 : "error: ‘begin’ was not declared in this scope"