MSYS2 comes with different environments/subsystems and the first thing you have to decide is which one to use. The differences between the environments is mainly between environment variables, default compilers/linkers, architecture, system libraries used etc. If you are unsure, go with MINGW64.
The MSYS environment contains the unixy/cygwin based tools, lives under
/usr and is special in that it is always active. All the other environments
inherit from the MSYS one and add various things on top of it.
For example in the MINGW64 environment your
$PATH starts with
/mingw64/bin:/usr/bin so you get all mingw64 based tools as well as all msys
|Name||Prefix||Toolchain||Architecture||C Library||C++ Library|