Summary
Keywords
Full Transcript
This tutorial explains how to install GCC and GDB on Windows 10 using MSYS2 for C/C++ programming. First, download and install MSYS2 from the official website, then update the package database and core packages using the command pacman -Syu. Next, install GCC by running pacman -S mingw-w64-x86_64-gcc (for 64-bit systems) and verify the installation with gcc --version. Then, install GDB with pacman -S mingw-w64-x86_64-gdb and check its installation using gdb --version. Finally, to run GCC and GDB from any directory, add the MSYS2 mingw64/bin path to your system’s environment variables. After completing these steps, you'll be ready to compile and debug C++ programs on Windows. Topics : 00:00 Introduction and Downloading Msys2 03:12 Installing Mysys2 Updating Packages 07:35 Installing gcc and g++ 12:14 Installing gdb debugger 16:00 Setting up Path Environment Variable 18:48 Check gcc g++ and gdb version in cmd First we will download and install msys2. After that we use the series of commands to install packages and update system. Commands used : Update the package database and base packages using pacman -Syu Update rest of the base packages pacman -Su Now open up the Msys MinGW terminal To install gcc and g++ for C and C++ For 64 bit pacman -S mingw-w64-x86_64-gcc For 32 bit pacman -S mingw-w64-i686-gcc To install the debugger ( gdb ) for C and C++ For 64 bit pacman -S mingw-w64-x86_64-gdb For 32 bit pacman -S mingw-w64-i686-gdb To check gcc version : gcc --version g++ version : g++ --version gdb version : gdb --version After installing these programs, we need to set the Path environment variable. Our Website https://www.LearningLad.com Social Media Facebook https://www.facebook.com/LearningLad Twitter https://www.twitter.com/LearningLadEdu Instagram https://www.instagram.com/LearningLadOfficial
