# Windows 下载和配置 gcc 环境

下载 tdm-gcc-5.1.0 x64:https://gitlab.com/mydevtool/mydevtool/-/raw/main/tdm-gcc/5.1.0/tdm64-gcc-5.1.0-2.exe (opens new window)

image-20230311215041398

image-20230311215055194

image-20230311215107970

勾选【gdb (Stable Release: 7.9.1-tdm64-2)】,这个是用来调试 64 位程序用的。

image-20230311215457043

等待安装完成。

image-20230311215614424

image-20230311215643128

image-20230311215656117

在 cmd 中输入 gcc --version,查看是否安装成功。

C:\Users\YOUR_USERNAME>gcc --version
gcc (tdm64-1) 5.1.0
Copyright (C) 2015 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.