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 build tools (you can also get the entirety of visual studio, but that's much bigger) 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
If you prefer gcc, you'll have to wait until we install a program which installs gcc.
Building Setup
Getting a terminal
Download msys2, this is a terminal which will allow us to get conan which is the package manager we'll be using.
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
Getting Git
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
configuring git
Before you can push code, you'll need to configure your settings you run these two commands putting in your proper credentials (note that you don't have to use a real email if you don't want to)
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
By default on my system when I run git commit, it brings up nano, and I'd prefer to use vim so I run this command:
git config --global core.editor "vim"
setting up ssh keys for git and github
This is an optional step that I highly recommend, first open up msys2 and then run ssh-keygen, there is no need to enter a password (the logic here is that if someone is already able to login to your computer they can do nasty stuff, so only do a password if you need that second layer of protection). Then login to github and click your account and go to settings and go to the ssh keys section, now we're going to copy the public ssh key from your computer that you got from running ssh-keygen. To do this we print out the public key and copy it, for us we ran cat .ssh/id_ed25519.pub and then copied that key into the github add key interface (no title is required).
Getting Conan
Download the conan package manager for cpp packages
pacman -S mingw-w64-ucrt-x86_64-python-conan
After downloading the above be sure to generate a conan profile with conan profile detect
Getting CMake
Download cmake cmake which is a build configuration generator, this allows you to setup a project to be built with specific settings while not having to have those settings stored in an operating system specific fasion, for example you can force your project to use c++23 without no matter what compiler you're using (apple-clang, mingw-gcc, gcc). TLDR conan most likely will need cmake installed to run.
pacman -S mingw-w64-ucrt-x86_64-cmake
Editing
To edit your projects different editors dramatically increase in complexity due to their support of using cmake/conan. In my experience it's best to steer clear of Visual Studio and Visual Studio Code, because it's difficult and finnicky to configure the paths so that it recognizes the conan directory, but I hope someone can prove me wrong. Anyways, if you're new to programming then I recommend you get the clion editor by jetbrains which is a really heavy editor but will support you quite well when you're new.
CLion
Download the program and get through the menus, you can select the non-commercial license. Once you have your conan project open it up, and move the compiler of your choice to become the default one in the toolchain menu, for us since we installed msvc we moved that to the first entry in the list. CLion will also probably make a default cmake profile called debug, we're only going to use the cmake profiles that conan generates so you can delete that one, we selected conan-default - conan-release for ours. You should then be able to run, build and have intellisense easily.
neovim
First setup your terminal with msys, the windows terminal is pretty nice: https://www.msys2.org/docs/terminals/
pacman -S mingw-w64-ucrt-x86_64-neovim
# the following two are optional but get some configuration going
pacman -S mingw-w64-ucrt-x86_64-ripgrep
git clone https://github.com/nvim-lua/kickstart.nvim.git /c/Users/ccn/AppData/Local/nvim
Then open nvim and type :Mason and get clangd and clang-format. Note that you'll have to make a build of your project using a gcc profile for conan to get clangd support.
other stuff
|other useful packages
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
visual studio 18 2026
For visual studio 18 2026 it requires cmake version 4.2 to be supported, due to that since msys2 only has version 3.3.0 of cmake then we cannot integrate visual studio 18 2026 with it. So we installed conan through the gui on windows, and then we installed cmake 4.2 through the gui, and then when we ran conan install . all packages had be rebuilt because there were no binaries yet stored for 195. And we got to a point where things didn't work because opus had a requirement on 4.1.2 of cmake because that's the largest available version on conancenter for cmake currently, and therefore since that doesn't have access to visual studio 18 2026, the compilation failed. Until 4.2 is uploaded to conancenter we cannot make progress.