Skip to content

Instantly share code, notes, and snippets.

@ahmednawazkhan
Last active April 8, 2025 03:45
Show Gist options
  • Save ahmednawazkhan/4da8acbdafe0798527874b0f00f16e45 to your computer and use it in GitHub Desktop.
Save ahmednawazkhan/4da8acbdafe0798527874b0f00f16e45 to your computer and use it in GitHub Desktop.
Install C++/Mingw-w64/g++ on windows

Installing C++/g++/Mingw-w64 on Windows

  1. Install Msys2 from msys2.org
  2. Complete the steps and open Msys2
  3. Update package databases pacman -Syu
  4. Update rest of base packages pacman -Su
  5. Install Mingw-w64 pacman -S --needed base-devel mingw-w64-x86_64-toolchain
  6. Install CMake pacman -S mingw-w64-x86_64-cmake
  7. Install Ninja pacman -S mingw-w64-x86_64-ninja
  8. Make sure to launch MSYS2 MinGW 64-bit with administrator rights ( This is !mportant...!!!)
    1. make sure you have access to cmake by running cmake, g++ by running g++ --version
@me21
Copy link

me21 commented Feb 10, 2025

I don't think MSYS2 needs administrator rights. It didn't for me. Maybe it would if you initially installed it with administrator rights.

@RaceyRiley
Copy link

we'll see cuz i just installed it with admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment