windows安装gcc编译器

  1. 进入这个地址nuwen

  2. 按照自己的需求在Download部分下载完整版或无git版

  3. 下载完成,点击安装,选择安装路径

  4. 打开安装的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目录删除就行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值