MSYS2 specify version of mingw32 or mingw64 gcc

3.1k views Asked by At

Is there a way to specify the GCC version i would like to install? I only get the latest version if i install it that way:

pacman -S mingw-w64-x86_64-gcc
1

There are 1 answers

0
David Grayson On BEST ANSWER

You can find a few older versions of GCC here:

http://repo.msys2.org/mingw/x86_64/

You can download them with wget and install them with pacman -U filename if I recall correctly. Note that using old packages in this way is a process prone to error because the packages might depend on older versions of their dependencies, which you would also have to install. Also, when you run pacman -Syu it would try to upgrade your GCC to the latest version.

You might be better off building the older versions of GCC yourself and installing them with a different name so they don't conflict with the MSYS2 packages.