在 Windows 10 64 位下安装 Mingw-w64
1、MinGW 的全称是:Minimalist GNU on Windows 。打开网址:http://www.mingw-w64.org/doku.php/download ,选择 MingW-W64-builds。如图1
2、下载包名:mingw-w64-install.exe。安装时报错:Cannot download repository.txt。如图2
3、选择 Win-Builds。如图3
4、Download and Installation From Windows。如图4
5、选择:Native Windows、x86_64、D:\Program Files (x86)\Win Builds。如图5
Win-Builds installation Select the system to install for: Native Windows Cygwin or MSYS Select the architecture to install for: i686 x86_64 Chose where to install Win-Builds (non-existant or empty diretory): Browse
6、安装完毕。如图6
7、复制:D:\Program Files (x86)\Win Builds\bin。如图7
8、编辑环境变量,将:D:\Program Files (x86)\Win Builds\bin 添加至环境变量中,重启电脑,Mingw-w64 的配置就完成了。如图8
9、打开 Windows PowerShell,运行命令:gcc -v,将会显示 Mingw-w64 的组件列表。安装成功。如图9
PS C:\WINDOWS\system32> gcc -v Reading specs from d:/program files (x86)/win builds/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/specs COLLECT_GCC=D:\Program Files (x86)\Win Builds\bin\gcc.exe COLLECT_LTO_WRAPPER=d:/program\ files\ (x86)/win\ builds/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.3/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-4.8.3/configure --prefix=/opt/windows_64 --with-sysroot=/opt/windows_64 --libdir=/opt/windows_64 /lib64 --mandir=/opt/windows_64/man --infodir=/opt/windows_64/info --enable-shared --disable-bootstrap --disable-multili b --enable-threads=posix --enable-languages=c,c++ --enable-checking=release --enable-libgomp --with-system-zlib --with-p ython-dir=/lib64/python2.7/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu -ld --verbose --enable-java-home --with-java-home=/opt/windows_64/lib64/jvm/jre --with-jvm-root-dir=/opt/windows_64/lib6 4/jvm --with-jvm-jar-dir=/opt/windows_64/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar='/home/adrie n/projects/win-builds-1.5/slackware64-current/d/gcc/antlr-*.jar' --disable-java-awt --disable-gtktest --build=x86_64-sla ckware-linux --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 Thread model: posix gcc version 4.8.3 (GCC)
近期评论