The problem with most of these is they date very quickly, and any option that does not age with time will always a better option and it turns out the MSYS2 is just such an option.
- To start, go to MSYS2 the home page and download and install the software as per the instructions found here: https://www.msys2.org/
- Once installed, open the shell using the following batch file found in the installation folder, or alternatively use the MSYS2, Windows Start menu to open the shell:
Code: Select all
msys2_shell.cmd
- As per the details found on the earlier link, it is now very easy to install the GNU C compiler using a command like this:
Code: Select all
pacman -S mingw-w64-ucrt-x86_64-gcc
- To install the complete set of development tools, use the toolchain package described here: https://packages.msys2.org/groups/mingw ... -toolchain
It can be installed using the following command:
Code: Select all
pacman -S mingw-w64-ucrt-x86_64-toolchain
- The non-ucrt version of this package is found here: https://packages.msys2.org/groups/mingw ... -toolchain
It can be installed using the following command:
NOTE: The ucrt packages use the Universal CRT rather than the much older msvcrt.dll runtime.Code: Select all
pacman -S mingw-w64-x86_64-toolchain
- In addition, as these commands are installing MinGW compilers, by searching for these artifacts and adding those folder locations to the system PATH means these compilers can also be run from the Windows command prompt:
Code: Select all
gcc.exe
Code: Select all
g++.exe
- Finally, by using the MSYS2 command prompt you can use a suitable pacman command to upgrade these compilers as needed. Just refer to the MSYS2 site for more details.