Closed crudelios closed 8 months ago
Frankly, I do not want to modify miniz
(if it's possible), because any upgrade becomes harder.
If I understand correctly, you want to include different miniz in your project (additionally)?
Frankly, I do not want to modify miniz (if it's possible), because any upgrade becomes harder.
Fair enough.
If I understand correctly, you want to include different miniz in your project (additionally)?
Not quite. I hate code duplication, so I wanted to use the same miniz header both for your zip library and for libspng (and also directly as a drop-in replacement for zlib).
I only managed to do it by adding the define mentioned above.
This is a very specific issue, so feel free to close it if you want.
This is the last one, I promise.
Right now, if you want to include
miniz.h
outside ofzip.h
, you'll run into linker errors due to duplicate definitions.The solution is rather easy: place an
#ifdef MINIZ_IMPLEMENTATION
right before miniz's function definitions and then, inzip.c
, add an#define MINIZ_IMPLEMENTATION
right before includingminiz.h
.