Lessons learned about how to make a header-file library (2013)
github.com
github.com
Unless it's out of necessity (C++ templates), all you're doing is killing my compilation time and I don't appreciate that.
(And really, if it's that hard to add a source file to your project, your build system probably needs help.)
The best way to be friendly to be developers who want to import your library, in my opinion, is to make it compile with all warnings enabled on common compilers.
Of course you usually wrap the header-only-lib in a central header/source pair of your own, so that those configuration defines and the implementation are in a single place instead of directly including the library header in different places.
For example I recently replaced libjpeg and libpng with one stb_image.h, it reduced 100kb of executable size, improved image loading speed by around 2x, reduced crashes on invalid image data for about 30% (we use american fuzzy lop fuzzer for testing).
For the record, this library is a single file with 6,755 (!) lines of code [1]