admin管理员组

文章数量:1530266

一、下载、安装

下载Windows环境下的gcc:

GCC with the MCF thread model

1、下载最新版

mingw-w64-gcc-mcf_20221020_12.2.1_x64-ucrt_e2dee17543236fdd8737a73c968e61a59f091f55.7z

2、将压缩包解压至没有中文目录的地址;

 3、配置环境变量:将地址“C:\***\gcc\gcc_1221\ucrt64\bin”添加到环境变量中

 4、测试gcc是否安装成功

C:\Users\Admin>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C:/Program_Files_AI/gcc/gcc_1221/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.1/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran --enable-shared --enable-static --enable-libatomic --enable-threads=mcf --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='GCC with MCF thread model, built by LH_Mouse' --with-bugurl=https://github/lhmouse/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: mcf
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.1 20221019 (GCC with MCF thread model, built by LH_Mouse)

C:\Users\Admin>

出现gcc版本号,表示安装成功:

gcc version 12.2.1 20221019 (GCC with MCF thread model, built by LH_Mouse)

本文标签: 编译器环境gcc