MinGW-w64 is a classic open-source C compiler that ported GCC to windows and included the win32API. Support to compile the source code to the Windows system can be executed programs.
To install MinGW-w64, you need to download it from its website, which may take some time. After downloading, decompress the file to the specified file. If you can decompress the file to disk D, you can obtain the file after decompression. Go to the bin folder and copy the full path, such as D:\mingw64\bin. Right-click and select "This Computer", select "Properties", select "Advanced System Settings", select advanced options in System properties, and click "Environment Variables".
Under System Variables, select Path and double-click to start editing environment variables. Fill in the exact path to the bin folder that you copied at the beginning, and be sure to save this setting when you are done.
At the same time, press the win+R key, open the run and enter cmd to enter the command line to verify whether the installation is successful.
Input gcc-v and g++-v If you can see the version details in the output result, we have successfully installed MinGW-w64:
gcc-v
g++-v
Some errors may occur during the installation process, such as file corruption/incomplete download file, etc. You can download the installer again by clearing the download cache. Change the download source, you can try to download from the official website/mirror site. If you can't complete the installation directly online, try downloading a compressed version of the compiler to manually extract the configuration environment variables.
There are also some cases where there is an error in the installation permission, you can install the program as an administrator, right-click the installer and choose to run as an administrator. During the installation process, ensure that the dependent libraries are installed correctly. Missing libraries can be manually added and downloaded and prevented from being stored in the specified directory.
The stability of the network connection can also affect the download process. A stable network connection can avoid download terminals or instability. If the installation package is damaged or missing, you can directly suspend the download, delete the download task and download the installation package again.