How to install Mingw-w64 and MSYS2?

Source: Internet
Author: User

Http://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2

If you ' re already planning on using MSYS2,

  1. 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).

  2. 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).

  3. Install a Toolchain

    A) for 32-bit:

    pacman -S mingw-w64-i686-gcc

    b) for 64-bit:

    pacman -S mingw-w64-x86_64-gcc
  4. Install any libraries/tools need. You can search the repositories by doing

    pacman -Ss package_name_of_something_i_want_to_install
  5. 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"

  6. 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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.