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
-
Download the installation package from the MinGW official website :
-
Open the installation software:
-
install to start the installation:
-
Customize the installation environment, continue to continue the installation:
-
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:
- Select installation on the menu bar, select apply changes, and complete the compiler installation:
3. Environment variable configuration
-
Enter advanced system settings:
-
Open Advanced->Environment Variables->User Environment Variables->path:
- Add the path of MinGW/bin to complete all configurations:
4. Compiler test
-
The shortcut key Win+R opens the running window:
-
Enter cmd to open the command window:
-
Enter gcc -v to display the version information to prove that the compiler is installed successfully: