How to Install C/C++ Programming Toolset ( gcc g++ gdb ) in Windows 11 using mingw-w64 and msys2 @LearningLad
How to Install C/C++ Programming Toolset ( gcc g++ gdb ) in Windows 11 using mingw-w64 and msys2  @LearningLad
Uploaded January 2025 | Updated November 2026, 1 day ago
In this beginners C Programming Language tutorial, we walk through the process of downloading and installing the C/C++ compiler and other necessary tools using mingw-w64 and msys2 for running C programs on your computer.

Command used in this video
Install gcc compiler : pacman -S mingw-w64-ucrt-x86_64-gcc
Install gdb debugger : pacman -S mingw-w64-ucrt-x86_64-gdb

The first step involves opening any browser, such as Microsoft Edge, and navigating to the website msys2.org. This platform allows you to download and install the GNU Compiler Collection (GCC), which is essential for compiling C programs.

Once on the MSYS2 website, you need to download the latest installer and run the setup. During installation, you can click through the prompts to proceed with the default settings, and once the installation is complete, you’ll be given the option to launch MSYS2 immediately.

After opening MSYS2, the first task is to update all the installed packages. To do this, you will execute the command `pacman -Syu`, which checks for updates and installs them. After completing the first round of updates, it’s a good idea to run the command again to ensure everything is fully up to date.

Next, you will install the necessary toolset for C and C++ programming. The command for this is `pacman -S mingw-w64-ucrt-x86_64-gcc`, which will install the GCC compiler. Once that’s done, you’ll also need to install a debugger. This can be done by executing the command `pacman -S mingw-w64-ucrt-x86_64-gdb`. Both commands will prompt you to confirm the installation by typing "Y."

After installing the compiler and debugger, we proceed to the final step, which involves updating the system's environment variable to include the path to the newly installed programs. You’ll need to open File Explorer, navigate to the msys64 folder, and copy the path to the "bin" folder where the GCC and GDB binaries are located. Then, in the "Edit Environment Variables" settings, you add this path to the system's "Path" variable.

To confirm the installation, you can open the terminal and check the versions of GCC, G++, and GDB by typing `gcc --version`, `g++ --version`, and `gdb --version`. If everything has been installed correctly, these commands will return the respective version information without any errors.

That’s all for this video! In the next tutorial, we’ll explore how to install and set up a code editor for writing and running C programs.

Our Website
LearningLad.com

Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial
How to Install C/C++ Programming Toolset ( gcc g++ gdb ) in Windows 11 using mingw-w64 and msys2User Input for Arrays in C Using For Loop | Read & Display Array ElementsWhile Loop in C Programming | Infinite Loop Explained with ExamplesPassing Pointers to Functions in C | Modify Variables Using Memory AddressesDo While Loop in C Programming | Syntax, Examples & Menu-Driven ProgramHow to Read Character from the File using fgetc function | File Handling in C LanguageBanking System Project in C Programming - Part 2 | View, Deposit Funds ImplementationHow to Write Characters Using the fputc Function | File Handling in C LanguageLets Build a Banking System Project using C Programming LanguageLearning C Programming Language compared to EnglishC Programming: How to Get the Memory Address of a Variable | & Operator ExplainedPointer to const in C Explained | Read-Only Access & const int Pointers
LearningLad |

How to Install C/C++ Programming Toolset ( gcc g++ gdb ) in Windows 11 using mingw-w64 and msys2

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER