Use MinGW GCC to configure environment variables under Windows

Let me give it a try first, hahahahahahaha. Why do you want to read this article? Because you cannot use the gcc command directly in the cmd window, you have to enter the MinGW installation path to use it. Without further ado, let’s get to the point!

Install MinGW first (download the offline package installation, do not use online installation, the failure rate is high)

Installation download: Mingw-w64 - GCC for Windows 64 & 32 bits [mingw-w64] (yaxm.org)

1. Enter the website downloads to download

2. Then find a SourceForge under Sources, as shown in the figure:  

 3. Select the appropriate MinGW-W64 GCC version. For example, I chose the x86_64-posix-seh version. Click on it to download, and then unzip the downloaded compressed package to the disk you want to put.

The next step is to configure the environment variables.

1. First add three system variables

MinGW_INCLUDE_PATH

MinGW_LIBRARY_PATH

MinGW_PATH

Right-click this computer-Properties-Advanced system settings-Environment variables-Create a new variable in system variables. The variable value selects its own actual path.

 2. Add MinGW_PATH to the Path variable: %MinGW_PATH%

Find Path in the system variables-double-click-New-put %MinGW_PATH%.

3.WIN+R enter cmd, open the command window and enter gcc to use 

If it was helpful to you, please move your cute little hands and give it a like!

Guess you like

Origin blog.csdn.net/qq_44848795/article/details/120818152