Download MinGW
First open the www.mingw.org. (note version, recommended 64bit)
www.mingw.org
Click Download Installer directly on the top right to download.
Click Download Installer to enter the download page
The new page that opens will prompt us to wait a few seconds before the download starts. If there is no response after more than 10 seconds, you can click the manual download below the progress bar direct link
.
Wait a few seconds before the page will pop up the download screen
To download another version, you can click on the Downloads in the upper right corner.
Click
Downloads
Then in the Open download page, click on the middle of the page Download mingw-get-setup.exe
to download the latest version, you can also select more versions below.
Click
Download mingw-get-setup.exe
Installing MinGW
Someone may find that the downloaded installation software is quite small, only dozens of K.
This is because we are only downloading a Package Manager and the Package Manager is installed before you can continue to install components such as compilers.
Note that the entire installation process is online, so please do not disconnect the network.
First open the installer and follow the prompts to install it with the default options.
Installation Interface
After the Package Manager installation is complete, this interface will pop up:
Package Manager Interface
Find mingw32-gcc-g++
(Note the class
property to be bin
), right- Mark for Installation
click.
Then click Options in the upper left-hand corner of the Installation
menu Apply changes
, and the manager will begin installing or updating the selected components online.
Wait patiently for the installation of the program.
After the installation is complete, close the Package manager, if for some reason the installation is unsuccessful, the program will give you a prompt before exiting the program, select the review changes
option to reinstall.
Configuring Environment variables
Open the environment variable, advanced system settings, Control Panel, systems, and more.
Environment variables
Find the options in the list PATH
, select and click Edit, add at the end
C:\MinGW\bin
Note If you do not add a semicolon () at the end of the original value of PATH ;
, add it yourself.
For example, the value of the original PATH is:
C:\Windows
Then the modified value should be:
C:\Windows; C:\MinGW\bin
The semicolon between the two paths cannot be discarded.
If the path selected at installation is not a C drive, fill in the directory of your choice, but be sure to locate the bin
folder.
Click OK to restart your computer and complete the configuration of the environment variables.
Verify that the installation is successful
Open the command line (click Start menu, run, enter cmd.exe
OK), enter
g++ -v
Test the version of g++, if the result is similar to the following result, it is not without the hint of such a command or file, which indicates that the installation was successful.
Test g++ version
You can also enter
gcc -v
Test the version of GCC.
Another simpler way is to enter directly
g++
If the resulting result is
g++: fatal error: no input filescompilation terminated.
You can also indicate that the compiler was successfully installed.
At last
At this point, the installation of MinGW is complete.
An introduction to the gcc/g++ command will be presented in the article g++ getting started.
The installation of GDB is described in the installation of GDB under Windows in this article.
Zhaosiyi
Links: http://www.jianshu.com/p/ff24a81f3637
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
http://blog.csdn.net/ztf312/article/details/77253161
Installation of gcc/g++ under Windows (with diagram, step-by-step)