Skip to content

Why Great C++ Libraries Fail

Make it a five-minute yes to contribute

Someone hits a small bug in your library and has a one-line fix they would happily send you. They want to help. Then they read your CONTRIBUTING.md: install Clang 18, CMake 3.28, Ninja, Conan 2.0, configure three presets, wait for a build. Twenty minutes later, before they have changed a single character, they give up. Willing contributors are rare, and that one was lost at setup.

Don't be asocial: respect the user's build system

You found the library, and now you just want to consume it. Except its CMake packaging is broken, or there is none at all, so using it means copying headers by hand, guessing at include paths, and fighting compiler flags it hardcoded over your own. There is no target to link against, and it drags in a home-grown dependency you have never heard of. To adopt it you would have to bend your build around its way of doing things, so you do what most people do: you reach for another library, or you write your own.

If they can't find you, the code doesn't matter

You need a units library for C++. You search GitHub for "units" and get a wall of repositories, all some variation of the same word, by different authors, with no obvious way to tell which one is alive, which one is serious, and which one will still be maintained next year. You pick one almost at random, or you give up and write your own. The library you needed might have been right there. You just could not find it, or could not tell it apart from the noise.