Installation #
- Install the
C/C++ extension for VS Codeextension in Visual Studio Code - Download the latest MSYS2 installer
- Open a MSYS2 terminal window and install the MinGW-w64 toolchain
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchainAccept the default number of packages in the
toolchaingroup by pressingEnter. - Add the path of your MinGW-w64 bin folder to the Windows PATH environment
If you used the default settings above, then this will be the path:
C:\msys64\ucrt64\bin. - Check your MinGW installation
gcc --version g++ --version gdb --version - Configure VS Code for C++ development
Add the configuration files to the .vscode folder at your project’s root.