Search code examples
gccinstallationmingw32mingw-w64msys2

MSYS2 specify version of mingw32 or mingw64 gcc


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

Solution

  • 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.