Hacker News new | ask | show | jobs
by dustbunny 371 days ago
I agree. I used chatgpt to write a makefile to compile sokol+Tracy. It's a pretty solid, generic makefile. But "build system complexity" pushed me away from sdl, magnum graphics and bgfx into the arms of sokol.

And I'm a 10+ year gamedev.

Out of all of c++'s sins, the lack of a solid integrated build system is the one that bites me the most.

2 comments

My theory is that good C++ devs haven't yet made a simple yet powerful build system because they're too busy making lots and lots of money writing enterprise C++.
We all just accepted CMake. It's not perfect but it works. C++ with SDL and Lua in a mono repo should be trivial. SDL3 supports CMake and Lua is simple to compile and make a CMakeLists.txt for.
This is correct. It has the key things that most C++ devs tend to care about:

- Cross platform support well integrating into "native" tooling

- Endless ability to add weird hacks to things to get around problems

The syntax is ...passable. I've never gotten a java stacktrace during a build failure (ahem bazel ahem).

It's straightforward enough to do the horrible things that C++ devs do all of the time like having 3 dependencies from system apt, 2 vendored, actually a 3rd is vendored but only used on windows, where the other 2 come from vcpkg, and 4 of these are statically linked but the last (openssl) is dynamic and accepts any version in order to support both ubuntu LTS and arch, but shipped as a dll on windows.

I have prayed before the CMake gods and they have accepted me.

Visual Studio + MSBuild is simple if you're okay with IDEs
I really recommend Bazel (https://bazel.build)
What us better about it?
Quite a few things. For a C++ only project, the biggest ones would be reproducibility and speed. But beyond those, I find it saner overall: the language is way easier to understand (~python), and the model of packages, targets, visibility etc makes it easy to organize and manage a large codebase.

The worst part about Bazel for C++ is that it’s not yet as widespread as CMake or plain old Makefiles so it can be harder to get third party libraries into your project, but that’s changing quite fast with the bazel registry, and you have things like rules_cc that help you run other build systems inside bazel.