Mingw和MSYS的安装记录

本文提供了一个详细的步骤来安装MinGW及配套工具,包括MSYS。首先下载并安装mingw-get到指定目录,接着配置环境变量,通过mingw-get安装必要的编译器和工具包如gcc、g++等。随后安装MSYS和MSYSDTK,并解压MSYSCORE文件。最后设置HOME环境变量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 下载mingw-get并安装到C:\mingw这个目录

http://sourceforge.net/downloads/mingw/Automated%20MinGW%20Installer/mingw-get/

2. 把C:\mingw\bin加入到PATH环境变量中

3. 运行如下命令安装需要的package

mingw-get install package

当前可用的package如下:
mingwrt                     the mingw32 runtime libraries.
w32api                      the MS-Windows API bindings for mingw32.
binutils                      the GNU binary file utilities.
gcc                            the GNU C Compiler (currently v3.4.5)
g++                           the C++ front-end for GCC-3.4.5
g77                           the FORTRAN-77 front-end for GCC-3.4.5
ada                           the Ada front-end for GCC-3.4.5
java                          the java front-end for GCC-3.4.5
objc                          the Objective-C front-end for GCC-3.4.5
mingw32-make         native MS-Win32 build of GNU make.
4.下载MSYS并安装到c:\MSYS\1.0目录

http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe

5. 安装MSYS DTK到c:\MSYS\1.0目录

http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe

6. 解压MSYS CORE到c:\MSYS\1.0目录

http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/msys-1.0.11/msysCORE-1.0.11-bin.tar.gz/download

7. 设置环境变量HOME为C:\msys\1.0\home

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值