How to Download and Install C Cpp Toolset ( gcc g++ gdb ) in Windows 11 using mingw-w64 and msys2
Why Stack Overflow recommends it
Stack Overflow users link it when answering or asking about VS Code and C/C++ setups on Windows where gcc or gdb is missing or not found.
Recommended by 2 people across 2 different months, 2021 to 2022.
What it is
A screen-recorded tutorial from the LearningLad channel showing how to install gcc, g++ and gdb on Windows using MSYS2 and mingw-w64. It covers downloading MSYS2, updating packages with pacman, installing the 64-bit toolchain and debugger, adding the mingw64/bin folder to PATH, and checking versions in cmd.
What people said
Recommends Sampat Aheer · 2021-01 · Stack Overflow · on “Visual Studio Code gives me "#include error detected" for C”
It may happen if you have visual studio and code together on your pc. Just try to uninstall all C and C++ extensions from apps list, visual studio and visual studio code on your pc then restart and again install the vs code. I wasted my whole day behind it but no JSON file did work for me. you only need to put the MinGW-64/bin path in JSON file on vs code where ever you have installed the MinGW-64 on your pc. if you do not have MinGW on your pc I am putting a video link [this video]
Recommends Manu Varghese · 2022-01 · Stack Overflow · on “Error while debugging using gdb debugger on VS Code using Windows 10 and MINGW complier”
I believe the problem is with the MinGW installation. I also faced this problem for a long time, solved it by doing the following: Completely removing the current MinGW Video tutorial [LINK] Installing MinGW-w64 from the site [LINK] mentioned in vscode documentation. installation video tutorial [this video] After this, I followed the configuration mentioned in this video [LINK] . The video is for c code, but you can make the required changes to c++ code. Now I'm able to debug in vscode. By this way, you will also be able to use the latest versions of gdb and g++ available.
Cites Adham Essam · 2022-01 · Stack Overflow · on “Can't run VSCode properly”
I am a beginner at using VSCode and wanted to code a bit with C++&C. I discovered that I had to add on some extensions and add a compiler to make things work, so I followed this video: [this video] . I followed it and everything was fine but even then when I started coding I still had bugs: [LINK] . I kept searching youtube and I couldnt get any help, I tried to re-install and everything went smoothly too but this problem occured, [LINK] . Can anyone help me fix this?
Cites icyfirejosh4352 · 2022-03 · Stack Overflow · on “visual studio code isn't noticing environment variables”
I am using C and C# in vscode, but cant seem to execute them. recently. when I tried to execute a C program, this came up: gcc : The term 'gcc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:61 + ... "d:\codin\C_yes_they_are_different\scripts\" ; if ($?) { gcc test.c ... + ~~~ + CategoryInfo : ObjectNotFound: (gcc:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException when the following command is run: cd "d:\codin\C_yes_they_are_different\scripts\" ; if ($?) { gcc test.c -o test } ; if ($?) { .\test