新版MinGW-w64(12.2.0)安装

本文介绍了如何安装最新版的MinGW-w64 12.2.0,包括Win32和Win64的不同版本选择,以及msvcrt和ucrt的运行库选择。提供了GitHub和Winlibs等下载链接,并详细解释了安装步骤,包括设置环境变量。

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

GitHub的MinGW已经更新到12.2.0了,SourceForge上面最新只有8.1.0

在这里插入图片描述

版本说明

Win32-i686-Windows 32位版本,在Windows 32位上本地运行并编译(也可以在Windows 64位上运行,但以32位模式运行)

Win64-x86_64-Windows 64位版本,在Windows 64位上本地运行并编译(不会在Windows 32位上运行)

在这里插入图片描述

msvcrt和ucrt

传统上,MinGW-w64编译器使用MSVCRT作为运行库,该库在所有版本的Windows上都可用。

由于Windows 10通用C运行时(UCRT)可作为MSVCRT的替代方案。通用C运行时也可以安装在早期版本的Windows上(请参阅:更新Windows中的通用C运行时间)。

除非您的目标是旧版本的Windows,否则UCRT作为运行库是更好的选择,因为它的编写是为了更好地支持最新的Windows版本,并提供更好的标准一致性(另请参阅:将代码升级到通用CRT)。

下载链接

安装

我下了三个版本,方便调试,个人按需下载就行

解压放到自己创建的文件夹中

在这里插入图片描述

配置环境变量,复制解压的路径

在这里插入图片描述

新建系统变量,名称添加为MinGW_HOME,变量值为刚刚复制的路径

在这里插入图片描述

Path添加 %MinGW_HOME%\bin

cmd查看版本,gcc -v

在这里插入图片描述

从SourceForge上Dump下来的MinGW最新版5.0.X完整版,涵盖完整迁移库,值得拥有。 完整可引入header列表: \MINGW\INCLUDE │ accctrl.h │ aclapi.h │ aclui.h │ adsprop.h │ afxres.h │ amaudio.h │ amvideo.h │ assert.h │ audevcod.h │ autosprintf.h │ aviriff.h │ aygshell.h │ basetsd.h │ basetyps.h │ bdatypes.h │ cderr.h │ cguid.h │ cmnquery.h │ comcat.h │ commctrl.h │ commdlg.h │ complex.h │ conio.h │ control.h │ cpl.h │ cplext.h │ ctype.h │ custcntl.h │ d3d9.h │ d3d9caps.h │ d3d9types.h │ dbt.h │ dde.h │ ddeml.h │ devguid.h │ dhcpcsdk.h │ dir.h │ direct.h │ dirent.h │ dlfcn.h │ dlgs.h │ docobj.h │ dos.h │ dsadmin.h │ dsclient.h │ dsgetdc.h │ dshow.h │ dsquery.h │ dsrole.h │ dvdevcod.h │ dvdmedia.h │ dxerr8.h │ dxerr9.h │ edevdefs.h │ errno.h │ errorrep.h │ errors.h │ evcode.h │ excpt.h │ exdisp.h │ exdispid.h │ fcntl.h │ fenv.h │ float.h │ fltdefs.h │ gdiplus.h │ getopt.h │ gettext-po.h │ glob.h │ gmon.h │ httpext.h │ icm.h │ iconv.h │ idispids.h │ il21dec.h │ imagehlp.h │ imm.h │ initguid.h │ intshcut.h │ inttypes.h │ io.h │ ipexport.h │ iphlpapi.h │ ipifcons.h │ ipinfoid.h │ iprtrmib.h │ iptypes.h │ ipxconst.h │ ipxrtdef.h │ ipxtfflt.h │ isguids.h │ ks.h │ ksmedia.h │ largeint.h │ libcharset.h │ libgen.h │ libintl.h │ limits.h │ lm.h │ lmaccess.h │ lmalert.h │ lmapibuf.h │ lmat.h │ lmaudit.h │ lmbrowsr.h │ lmchdev.h │ lmconfig.h │ lmcons.h │ lmerr.h │ lmerrlog.h │ lmmsg.h │ lmremutl.h │ lmrepl.h │ lmserver.h │ lmshare.h │ lmsname.h │ lmstats.h │ lmsvc.h │ lmuse.h │ lmuseflg.h │ lmwksta.h │ localcharset.h │ locale.h │ ltdl.h │ lzexpand.h │ malloc.h │ mapi.h │ math.h │ mbctype.h │ mbstring.h │ mciavi.h │ mcx.h │ mem.h │ memory.h │ mgm.h │ mgmtapi.h │ mlang.h │ mmreg.h │ mmsystem.h │ mpegtype.h │ mprapi.h │ mq.h │ msacm.h │ mshtml.h │ msvcrtver.h │ mswsock.h │ nb30.h │ nddeapi.h │ nspapi.h │ ntdef.h │ ntdll.h │ ntdsapi.h │ ntdsbcli.h │ ntldap.h │ ntsecapi.h │
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ofo300

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值