: Follow the installation wizard prompts. It is recommended to use the default installation folder, typically C:\msys64 .
After installing the compiler, you must prepare VS Code to recognize and use it.
Setting Up MinGW GCC Compiler with Visual Studio Code To develop C or C++ applications on Windows using Visual Studio Code (VS Code) , you must install a compiler separately because VS Code is a lightweight editor, not a full Integrated Development Environment (IDE). The toolchain is the standard recommendation for providing the GCC (GNU Compiler Collection) on Windows. Step 1: Download and Install MinGW-w64 via MSYS2 mingw gcc compiler download vs code
To use the gcc or g++ commands in any terminal, including the one inside VS Code, you must add the compiler's bin folder to your Windows Environment Variables.
: Open VS Code and go to the Extensions view (Ctrl+Shift+X). Install the C/C++ Extension Pack by Microsoft. : Follow the installation wizard prompts
: Visit the official MSYS2 website and download the installer executable.
The most reliable way to get an up-to-date GCC compiler is through MSYS2 , which provides the MinGW-w64 toolchain and a package manager called pacman . Setting Up MinGW GCC Compiler with Visual Studio
: Open a new Command Prompt or PowerShell and type gcc --version . If successful, the version information will appear. Step 3: Configure Visual Studio Code
When searching for downloads, you may encounter the original "MinGW" project (often hosted on SourceForge ). It is important to choose because: Using GCC with MinGW - Visual Studio Code
: Press Enter to accept the default selection of all packages and type Y when prompted to proceed. Step 2: Add MinGW to the System PATH