7 ms·
IMHO it's dumb to limit the libraries to just two files. Whether or not a library is included in the list should be determined on a per-library basis. Some head
by stevemk14ebr 10y ago
IMHO it's dumb to limit the libraries to just two files. Whether or not a library is included in the list should be determined on a per-library basis. Some header-only libraries simply require more than one header file or the source code becomes an absolute mess.
- CamperBob2 10y agoYou don't understand. It's OK if the source code becomes "an absolute mess." That's because it's a finite absolute mess, as opposed to most FOSS library and utility projects. An stb library is often the precise mess you need, and maybe even the one you deserve, with none of the seemingly-infinite, unbounded dependency messiness that you don't. Sean's doing the Lord's work here, or at least the Buddha's.
- ovao 10y agoMultiple parts to a header-only library can be concatenated into a single header file for easier inclusion, however. Some single header-only libraries are actually built this way. I agree with you in principle though. A directory of header files is, in practice, and in my experience, no more difficult to work with than a single header file and (can) allow for more modularity.
- IshKebab 10y agoThe single-file approach is to simplify including the library in your project. Just copy the file and type #include "whatever.h". It's because C/C++ still doesn't have a decent module system, nor a universally accepted library distribution system. You can still write the project as separate files and the concatenate them for distribution.
- aninteger 10y agoIt sorta does. It's just we use the packaging tools of the operating system (like apt-get and equivalent tools on other systems). That and pkg-config solves 99% of the problem on Unix-based systems. Windows on the other hand... Good luck.