-
进入这个地址nuwen
-
按照自己的需求在Download部分下载完整版或无git版
-
下载完成,点击安装,选择安装路径
-
打开安装的MinGW目录下的README参考,里面提供了两个选择配置:
Option A: In an existing Command Prompt, run set_distro_paths.bat to add the
distro to that Command Prompt’s PATH.Option B: Create a shortcut to open_distro_window.bat, which will open a new Command Prompt with the distro on its PATH. You may move the shortcut to another directory (or the Desktop), and you may modify the shortcut’s properties to start in a directory of your choice (for example, C:\Temp).
Leave set_distro_paths.bat and open_distro_window.bat in the root of the distro.
Neither Option A nor Option B permanently modifies your system.
- Option A在cmd窗口切换到你想要的路径,在命令行执行
set_distro_paths.bat
,记得补充它的绝对路径 - Option B 给
open_distro_window.bat
创建一个快捷方式,把这个快捷方式放到你想要的目录运行。
完成后,命令行输入g++ --version
,测试安装是否成功
C:\Temp>g++ --version
g++ (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Temp>
现在可以使用gcc命令编译了
卸载
把MinGW目录删除就行