I want to thoroughly understand the usage of environments from the MSYS2 platform. A partial description is available at: https://www.msys2.org/docs/environments/
Things I understand:
MSYS environment it is used to build applications that will run only in the MSYS2 environment. There is a POSIX layer available through the cygwin C library. Applications are compiled with GCC for 64 bits (exception for 32 bit MSYS2 installed).
MINGW64 environment it is used to create native Windows applications that run independently of the MSYS2 environment. Using the old MSVCRT technology. Applications are compiled with GCC for 64 bits.
MINGW32 environment it is used to create native Windows applications that run independently of the MSYS2 environment. Using the old MSVCRT technology. Applications are compiled with GCC for 32 bits
UCRT64 environment Applications are compiled with GCC for 64 bits. Using the newer UCRT technology.
CLANG64 environment Applications are compiled with LLVM for 64 bits. Using the newer UCRT technology.
The difference between UCRT64 and CLANG64 is a different compiler. Clang (frontend for LLVM) is partially compatible with GCC commands.
My questions:
But when to use UCRT64 and when to use MINGW64? Can I build libraries with UCRT64 that I can link dynamically or statically then building a project with MSVC compiler? Is it possible to build a library with MSYS2 that I can link later using the MSVC compiler?
path %PATH%; C:\msys2\usr\bin
, which throws the binaries you install via pacman into the regularcmd
shell, not their special one. – Biologist