Re:QOI: Lossless Image Compression in O(n) Time
by bluedino on Wednesday November 24, 2021 @03:54PM
(#29335030)
What if you want to use the functions in other C files? What if you want to compile them all separately?
[ Parent
| on HN ]
Re:QOI: Lossless Image Compression in O(n) Time
by hn_acc_2 on Wednesday November 24, 2021 @05:11PM
(#29335772)
1) Include it wherever it's used. The convention is to use the preprocessor[1] so it only appears once in the final binary
2) Most developers just want to compile to a single binary. Any developer who for some reason needs separately compiled objects should be able to quickly achieve that from a single-file library
[1] https://github.com/phoboslab/qoi/blob/324c2243b2fb35f741a88d...