First, find the download link on www.mingw.org, and then download the network installer, which is very small. The latest version is 5.1.6. Then click the mingw-5.1.6.exe, and then keep next, Select Download only, so that the next redo not go to the Internet to find. After the installation, click "mingw-5.1.6.exe" to install the package. However, the package is not downloaded again. When selecting the installation package, you can select all or by default, and then install the package, which is very simple.
It cannot be used after installation, because no environment variables have been set. Next we will set the environment variables. The installation path is in the C: \ mingw directory.
Right-click my computer and choose Properties> advanced> environment variable. Then:
1. Add c: \ mingw \ bin to the path. Remember to add a semicolon if there are other variables in it. The semicolon must be entered in the English input mode.
2. Create a New LIBRARY_PATH variable. If yes, add c: \ mingw \ Lib to the value, which is the location of the standard library.
3. Create the c_include_path variable and set it to c: \ mingw \ include.
4. Create a cplus_include_path variable with the value c: \ mingw \ include \ c ++ \ 3.4.5; C: \ mingw \ include \ c ++ \ 3.4.5; C: \ mingw \ include \ c ++ \ 3.4.5 \ backward; C: \ mingw \ include.