C/C++教程

C语言环境变量的配置和验证

本文主要是介绍C语言环境变量的配置和验证,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

(1)下载 MinGW 工具包:https://www.onlinedown.net/soft/577868.htm

我是放在 D 盘 java 文件夹里面:然后解压后直接在电脑环境变量配置:

MinGW_HOME = D:\Java\mingw7.2.0\64-bits

path = %MinGW_HOME%\bin;%MinGW_HOME%\x86_64-w64-mingw32\include;

=================================================================

(2)查看是否安装成功:gcc -v

展示:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=d:/java/mingw7.2.0/64-bits/bin/../libexec/gcc/x86_64-w64-mingw32/7.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../source/gcc-7.2.0/configure --build=x86_64-pc-mingw32 --target=x86_64-w64-mingw32 --disable-shared --enable-static --disable-nls --disable-multilib --prefix=/r/make6t4/newsystem/mingw-w64-x86_64 --with-sysroot=/r/make6t4/newsystem/mingw-w64-x86_64 --with-mpc=/r/make6t4/newsystem/pkgs/mpc/mpc-1.0.3-x86_64 --with-mpfr=/r/make6t4/newsystem/pkgs/mpfr/mpfr-3.1.5-x86_64 --with-gmp=/r/make6t4/newsystem/pkgs/gmp/gmp-6.1.2-x86_64 --with-isl=/r/make6t4/newsystem/pkgs/isl/isl-0.16.1-x86_64 --enable-languages=c,c++ --enable-fully-dynamic-string --enable-lto
Thread model: win32
gcc version 7.2.0 (GCC)

即是安装成功。

这篇关于C语言环境变量的配置和验证的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!