4 ms·
There really is no "correct way" to distribute C libraries and at this point it seems you're nitpicking just to nitpick. Imgui uses the same method, no one ever
by stelonix 4y ago
There really is no "correct way" to distribute C libraries and at this point it seems you're nitpicking just to nitpick. Imgui uses the same method, no one ever complained. If you do require obj files to not be "bloated" (why?) you can always do it the C way of having separate C/H files.
- linkdd 4y agoimgui distribute .c/.h files, not .h files with .c embedded in them. What I'm criticizing is the extra step of me having to write the .c files anyway to avoid bloating the obj files, which should have been done by the library in the first place.
- torstenvl 4y agoAs others have pointed out, you don't need to write extra .c files, and you won't bloat the obj files. This paradigm is fairly common, see, e.g.: https://github.com/lieff/minimp3 https://github.com/lieff/minimp3 https://github.com/Immediate-Mode-UI/Nuklear https://github.com/Immediate-Mode-UI/Nuklear https://github.com/mattiasgustavsson/libs/blob/main/docs/http.md https://github.com/mattiasgustavsson/libs/blob/main/docs/htt...
- pjmlp 4y agoThere is, just like C has been doing in its 50 years of history, header only libraries are a consequence of new generations pretending C is something like Python.