win10 64 gcc install MinGW-w64

Note: If you can’t turn it over, you can do the same offline package.

The installation and use of Mingw-w64 under win10

0. Introduction

MinGW (Minimalist GNU for Windows), is a minimalist development environment suitable for Microsoft windows applications. MinGW provides a complete set of open source programming tools, suitable for the development of native MS-Windows applications, and does not rely on any third-party C runtime DLL. MinGW is mainly used by developers working on the MS-Windows platform, but it can also be used across platforms. MinGW includes:

  1. A port of GCC, including C, C++, ADA and FORTRAN compilers;
  2. GNU Binutils (such as: as, ld, ar, etc.);
  3. A command line installer with optional GUI front end (mingw-get) for MinGW and MSYS deployment on MS-Windows;
  4. A GUI first-time setup tool (mingw-get-setup) can help start and run mingw-get.

Mingw-w64 is an upgraded version of the original mingw.org project, which aims to support the GCC compiler on Windows systems. It branched in 2007 to provide support for 64-bit and new APIs. Since then, it has been widely used and distributed.

1. Download

Download to sourceforge

installation

You can use Installer to install or download the following compressed package directly
. If you use installer to install, download and run MinGW-W64-install.exe
as shown
installer
below. The following is a description of several options

  1. Version Specify the version number, from 4.9.1-8.1.0, choose according to your needs, and use the latest version without special requirements;
  2. Architecture is related to the operating system, 64-bit systems choose x86_64, 32-bit systems choose i686;
  3. Threads set thread standard optional posix or win32;
  4. Exception sets the exception handling system, x86_64 can be seh and sjlj, i686 is dwarf and sjlj;
  5. Build revision build version number, select the largest.

To download the compressed package, choose a suitable location to unzip it, and add mingw64/bin to the environment variable.

  1. use

After adding environment variables, open CMD, execute gcc -v and you
can see similar information, which means the installation is successful
info

Then you can use gcc and g++ happily.
PS: It can be used with other IDEs such as Eclipse CDT or Clion, or combined with a text editor, such as: Sublime Text 2/3, Atom, VsCode.

Guess you like

Origin blog.csdn.net/oqzuser12345678999q/article/details/108003464