Ah, I remember my early days of learning C++ in school. The teacher provided us some boxes running Debian, on which Code::Blocks and GCC were installed. To be honest, I actually liked C::B, as it's not a bad IDE to start with. Things have changed, to say the least.
As I moved on to bigger projects, I needed better tools. I initially tried Microsoft's Visual Studio 2015, but, it was bad. Qt Creator, which I tried in 2018, was a surprisingly good IDE, but I also ran into issues with it later down the line (mostly related to its code completion and analysis features). I also gave more recent versions of VS a spin, but quickly gave up because it was still bad. VS Code ? Hell nah!
So, I found a setup I'm comfortable with, and I'll share it with you.
Mostly Windows 10, because my current project's users are on Windows too. I know Wine exists, but back when I switched to Windows for development (which was not long before I left school), it had quirks I wanted to avoid.
I use Arch Linux too. Much less, though, because I don't have any projects that need to target Linux at the moment.
GCC has been a trusty companion since 2014, and I don't think I'll ever leave it behind. On Windows, I use MinGW-w64, which is a modern version of the old MinGW, as it's the best way to use GCC on that OS.
I also keep LLVM/Clang nearby, as it's a really solid toolchain that's easy to get into if you're already used to GCC (it uses many of the same flags, among others).
On Windows, MSYS2 is in my opinion the best way to get a development environment up and running. That's where I get my toolchains from, and it has a lot of prebuilt libraries and apps available in its package repositories.
On Linux, well, the distro's package manager works just fine.
Failing that, I can just grab what I need using Git and build it myself.
At first, I used Code::Blocks' integrated build system, but, it's not that good, and if you want to share your project with others, they need to have the IDE installed too. So, I also looked for something else.
In 2018, I discovered CMake. Well, I already used it in the past, but I did not write my own
CMakeLists.txt files until that fateful year. What made me adopt it was its relative ease of use... and the fact that Magnum (a graphics library I started using at the same time as CMake), which a project I started back then depended on, also used it.
CMake relies on generators to create build files, which grant it the ability to generate standard
Makefiles, Code::Blocks or VS projects, or even files for a small tool known simply as Ninja.
Ninja is the second half of my build setup. It's blazing fast (faster than
make -j), and really reliable (more than
make -j). Verdict ? It's so good I just wouldn't work on a platform where I can't use it.
Back in 2019 (or 2020, can't really remember), as I was lurking on a Discord guild called "The Coding Den", someone mentioned an IDE called CLion, by a company named JetBrains. So, I decided to give it a spin, but I didn't like it for some reason. Oh, how foolish I was.
In June/July 2021, the aforementioned issues with Qt Creator became worse, so I decided to give CLion another spin. I wasn't even halfway through the 30-day trial period that I went on JetBrains' website and nearly shouted "shut up and take my money!".
Yes, it's not free. Yes, it's expensive 1. Did I care back then ? No, and I still don't care today. Best C++ IDE I ever used, hands down, and it gets better with each new major version. It does everything I need it to do, and it does it well. It's cross-platform, too!
- ^ For a personal subscription, it costs 89€/year or 8.90€/month without VAT, though the price goes down the longer you stay subscribed.
GDB all the way, with CLion as a frontend. I'll give LLDB a spin when I'll start working on the Linux/Deck version of the M.A.S.S. Builder Save Tool, as CLion doesn't support it on Windows for non-MSVC targets (yet).
Git! Because nothing else even comes close. While I sometimes use the command line, especially on my Raspberry Pi or when I need to clone a repo, I mostly use the excellent Git Extensions to do most of my repo management.