Here's how I setup cpp for development on windows
Compiler
For compatilbility reasons I usually recommend using msvc which you can get by downloading microsoft visual studio this also comes with the benefit of conan having many pre-built packages for msvc. Alternately you can use gcc, pacman -S mingw-w64-ucrt-x86_64-gcc
Building Setup
- download msys2
-
use the URCT terminal profile, note that when you launch the terminal you will not be in the root of your base computers filesystem, instead you have to do
cd /c/Users/username
to get there - download git (note that you might already have git installed such as git bash on your computer, this is ok, this version won't conflict and is contained within the scope of your msys2 setup)
pacman -S git
pacman -S mingw-w64-ucrt-x86_64-python-conan
After downloading the above be sure to generate a conan profile with conan profile detect
pacman -S mingw-w64-ucrt-x86_64-cmake
Others
Install an editor: pacman -S mingw-w64-ucrt-x86_64-neovim or something like Zed: https://zed.dev/docs/development/windows
Install python pacman -S mingw-w64-ucrt-x86_64-python-conan
If there are problems building
If cmake wants to use Mingw Makefiles then make sure you have make
pacman -S mingw-w64-ucrt-x86_64-make