C++ 如何将 MinGW bin 目录添加到我的系统路径?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5733220/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 18:44:47  来源:igfitidea点击:

How do I add the MinGW bin directory to my system path?

c++windows

提问by niro

I am using Windows XP. I am trying to add a new library to Dev-C++. For that, I need to install MinGW and then I have been instructed to add the bindirectory of MinGW to my system path. But, I don't know how to do it. Please guide me (step by step) to add this to my system path.

我使用的是 Windows XP。我正在尝试向Dev-C++添加一个新库。为此,我需要安装 MinGW,然后我被指示将binMinGW的目录添加到我的系统路径中。但是,我不知道该怎么做。请指导我(逐步)将其添加到我的系统路径中。

回答by Dave

To change the path on Windows XP, follow these instructions, and then add the directory where you install MinGW plus bin. Example: if you install MinGW in C:\ then you have to add C:\mingw\binto your path

要更改 Windows XP 上的路径,请按照以下说明操作,然后添加安装 MinGW plus 的目录bin。示例:如果您在 C:\ 中安装 MinGW,那么您必须添加C:\mingw\bin到您的路径

Just for completeness here are the steps shown on the link:

为了完整起见,这里是链接上显示的步骤:

  1. From the desktop, right-click My Computerand click Properties.
  2. In the System Propertieswindow, click on the Advancedtab.
  3. In the Advancedsection, click the Environment Variablesbutton.
  4. Finally, in the Environment Variableswindow, highlight the Pathvariable in the Systems Variablesection and click the Editbutton. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

    C:\Program Files;C:\Winnt;C:\Winnt\System32;c:\mingw\bin

  1. 在桌面上,右键单击我的电脑,然后单击属性
  2. 在“系统属性”窗口中,单击“高级”选项卡。
  3. 高级部分中,单击环境变量按钮。
  4. 最后,在Environment Variables窗口中,突出显示Systems Variable部分中的Path变量并单击按钮。添加或修改带有您希望计算机访问的路径的路径行。每个不同的目录用分号分隔,如下所示。Edit

    C:\Program Files;C:\Winnt;C:\Winnt\System32;c:\mingw\bin