C/C++ compiler configuration - MinGW download and installation

I. Introduction

Due to the reinstallation of the Win11 system, all configuration environments need to be reinstalled, and a simple record is made for the C/C++ compiler MinGW configuration.
Software such as VS code only provides editors, not compilers, so the C/C++ compiler on the windows system needs to be implemented by installing MinGW.

2. Installation process

  1. Download the installation package from the MinGW official website :
    insert image description here

  2. Open the installation software:

insert image description here

  1. install to start the installation:
    insert image description here

  2. Customize the installation environment, continue to continue the installation:
    insert image description here

  3. Wait for the installation to complete, click continue to complete the installation, enter the MinGW installation manager interface, and select the following two compilers to install:

insert image description here

  1. Select installation on the menu bar, select apply changes, and complete the compiler installation:
    insert image description here

3. Environment variable configuration

  1. Enter advanced system settings:
    insert image description here

  2. Open Advanced->Environment Variables->User Environment Variables->path:
    insert image description here

insert image description here

  1. Add the path of MinGW/bin to complete all configurations:
    insert image description here

4. Compiler test

  1. The shortcut key Win+R opens the running window:
    insert image description here

  2. Enter cmd to open the command window:
    insert image description here

  3. Enter gcc -v to display the version information to prove that the compiler is installed successfully:
    insert image description here

Guess you like

Origin blog.csdn.net/weixin_43361652/article/details/128049243