The easiest installation configuration for Windows mingw64

In fact, it is quite simple. Many tutorials make it complicated. Write one yourself.

only two steps

1. Download the compressed package and unzip it

2. Configure environment variables

(1). GitHub download address

Releases · niXman/mingw-builds-binaries · GitHub

If the GitHub download is too slow, you can come here to speed up or use address 2

GitHub Proxy proxy acceleration (ghproxy.com)

(2). Download address 2 
WinLibs - GCC+MinGW-w64 compiler for Windows

(1) (2) The downloaded compressed package is named similarly

The ones I use are circled in orange

x86_64-13.1.0-release-posix-seh-ucrt-rt_v11-rev1

See below for a detailed explanation of each word

 The difference between these compressed packages is mainly reflected in the following aspects:

1. Architecture: x86_64 indicates that these compressed packages are suitable for 64-bit x86 processor architecture.

2. Version (Version): 13.1.0-release indicates that the version number of these compressed packages is 13.1.0, and it is an officially released version.

3. Operating System Platform (Operating System Platform):
   - posix: These compressed packages are suitable for operating systems that conform to the POSIX standard, such as Linux, UNIX, etc.
   - win32: These archives are for 32-bit Windows operating systems.

(I choose posix because Linux and Windows are often used together. If you only use Windows to develop, then choose win32)

4. Exception Handling:
   - seh: These tarballs use Structured Exception Handling to handle exceptions.
5. Runtime Library:
   - msvcrt: These tarballs use the Microsoft Visual C++ Runtime Library (MSVCRT).
   - ucrt: These tarballs use the Universal C Runtime Library (UCRT).

6. Version revision (Revision): rev1 means that the revision number of these compressed packages is 1.

To sum up, these compressed packages are mainly distinguished according to the architecture, version, operating system platform, exception handling method and runtime library. You can choose a suitable compressed package according to your needs and operating system.

  1. MSVCRT(Microsoft Visual C++ Runtime):

    • MSVCRT is the legacy runtime library of the Microsoft Visual C++ compiler, used to support programs compiled with Visual C++ on Windows systems.
    • It provides the implementation of many standard C library functions and C++ runtime functions to support the running and debugging of programs.
    • MSVCRT is often associated with earlier Visual C++ versions such as Visual Studio 2010 and earlier.
  2. UCRT(Universal C Runtime):

    • UCRT is a new-generation runtime library introduced since Windows 10, designed to provide better compatibility and performance.
    • UCRT is a general-purpose C runtime library used to support programs compiled with the C language, not just limited to the Visual C++ compiler.
    • It provides updated implementations of the standard C library functions and supports some new C standards (such as the C11 standard).
    • UCRT is associated with newer versions of Visual C++ such as Visual Studio 2015 and newer.

To sum up, UCRT update is recommended if the development has no historical burden. If you want to consider compatibility, use MSVC

The official installation begins:

1. Download and unzip 

Note that the x86_64-13.1.0-release-posix-seh-ucrt-rt_v11-rev1 folder name is too long, just use the subfolder mingw64 .

Put it where you usually install software

Copy this path to the clipboard

2. Configure environment variables

 

Paste the environment variables you copied above and save 

 and save

enter

gcc -v

 

success 

Guess you like

Origin blog.csdn.net/m0_52559040/article/details/131603782