▲ | tredre3 3 days ago | ||||||||||||||||||||||||||||||||||||||||
> no instruction bloat via creating multiple instances for all functions. This makes me think that you're using single-header libraries wrong. These kind of libraries usually require you to do something special prior to including it to get the actual code and you must do it only in ONE file. For example, you'd #define RGFW_IMPLEMENTATION before #include rgfw.h in exactly ONE .c. If you need the header in other files, you do NOT define RGFW_IMPLEMENTATION and no code will be produced. | |||||||||||||||||||||||||||||||||||||||||
▲ | uecker 3 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||
Well, I do not use them at all. But I agree that this mechanism would avoid the additional copies. I have seen other single-header libraries though... In any case, forcing me to figure out the specific XYZ_IMPLEMENTATION for each library is less user friendly that just proving a .c and .h file. | |||||||||||||||||||||||||||||||||||||||||
|