MinGW downloads and configures the gcc/g++ compilation environment

This article will explain how to download MinGW and configure the gcc\g++ compilation environment

1. Download MinGW 
Download the "mingw-get-setup.exe" 
portal from the MinGW official website: http://www.mingw.org/ 
MinGW official website
It is said that there are offline compressed packages that can be downloaded, but I did not find them - panic.

2. Install MinGW 
Open the downloaded software  ,
software 
choose to install and wait (the computer needs to be connected to the Internet at this time) 
Install 
Continue 
Wating

3. After downloading the gcc 
installation, click "continue" to open the MinGW Installation Manager. 
As shown in the figure, right-click on the line containing the word gcc, select "Mark for Installtion" 
and, select "Installtion" -> "Apply Changes" 
Then, click "Apply" to confirm the operation 
Finally, click "Close" to close after confirming that the installation is complete Dialog 
gcc
apply changes
apply 
Close 
//If the network quality is not good, a warning may pop up, and you should be able to continue by manually clicking OK.

4. Configure environment variables 
Open "System Properties" -> "Environment Variables 
", select "Path" in "System Variables" and click "Edit", 
click "New", and enter "C:\MinGW\bin" (if you change it yourself Please modify the path here according to the installation path of MinGW) 
Then, click "OK" to close all dialog boxes. 
Restart the computer! ! ! !

5. Check whether gcc is installed successfully. 
Win+R (open and run), 
enter "cmd"  and
type "gcc -v". 
If the situation as shown in the figure appears, the installation is successful. 
cmd

finished~~~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325294528&siteId=291194637