Http://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2
If you ' re already planning on using MSYS2,
Download MSYS2 from this page (choose/64-bit According to "version of Windows" is going to use it on, not wh At kind of executables you want to build, both versions can build both and 64-bit binaries).
After the install completes, click to the newly created "MSYS2 Shell" option under either MSYS2 64-bit
or in the MSYS2 32-bit
Start menu . Update MSYS2 According to the wiki (although I just does a pacman -Syu
, ignore all errors and close the window and open a new one, This isn't recommended and you should does what the wiki page says).
Install a Toolchain
A) for 32-bit:
pacman -S mingw-w64-i686-gcc
b) for 64-bit:
pacman -S mingw-w64-x86_64-gcc
Install any libraries/tools need. You can search the repositories by doing
pacman -Ss package_name_of_something_i_want_to_install
Open a mingw-w64 Shell:
A) to build 32-bit things, open the "Mingw-w64 32-bit Shell"
b) to build 64-bit things, open the "Mingw-w64 64-bit Shell"
Verify that the compiler was working by doing
gcc -v
If you want to use the Toolchains (with installed libraries) outside of the MSYS2 environment, all you need to does is add the c4/> or to <MSYS2 root>/mingw64/bin
your PATH
.
How to install Mingw-w64 and MSYS2?