zip library name (rename library?)
Hello
Not sure if it's an issue or a request, but when working in environments where the original libzip is also available, there's no clear way to switch between libzip and your minimal zip library.
So I was wondering, could you use a different name for your zip library to avoid the duplicate name?
Note: As a personal workaround, I renamed your library to libkzip.a, and I use #include <kzip.h> when I don't want to use or link the original libzip.
Frankly speaking, just renaming the library/project - I don't think it's a good idea.
But maybe we can solve your problem in a different way (with some ifdefs etc.)
Do you use both libraries at the same time (zlib and zip)? If not how do you want to switch between them?
@bucanero - ☝🏻
@bucanero - ☝🏻
Oh, I missed your reply.
For example, I made an application for the PS Vita, using the open-source Vita SDK. The SDK already has cross-compiled libraries, including zlib and libzip.
libzip was too much overhead for my project, so I wanted to use your zip library. But the problem is that if I want to make and install your library to the SDK default folders (/lib, /include), it will overwrite the libzip.a and zip.h from the original bundled libzip.
I know I could just add your sources into my own project, but I'd like to keep my project repository clean from external dependencies.
About your question: no, I'm not using libzip and your zip library on the same project. I do use zlib for some specific things, so I'm building your library with MINIZ_NO_ZLIB_APIS and MINIZ_NO_ZLIB_COMPATIBLE_NAMES to avoid any conflicts.
Maybe you can check if setting CONFIG_INSTALL_DIR INCLUDE_INSTALL_DIR (from cmake) will work for you.
Otherwise maybe you can those 3 files into your project
I'd prefer to avoid bundling the zip files into my code, as I'm using the library on a few different projects, and I like to have a single source for all. (otherwise, I'd have to bundle the zip files with every project)
I'll check cmake, but I still feel that your library could be called kzip (for example), and it would also help to avoid confusion with the original libzip from https://libzip.org/
On a side note, if this library were a perfect match to the libzip.org API, then I wouldn't mind if they were called the same, because you could replace one with the other, and the code would compile anyways.
I'm sorry, but frankly speaking I don't see the point to rename this library/repo. Many other projects (like https://github.com/facebook/hermes, https://github.com/assimp/assimp, etc.) uses this library, so changing the name can potentially break others stuff.
You can always keep in sync your own fork, or maintain vcpkg package. By the way vcpkg is pretty old, so would be cool to update it:
vcpkg search kubazip
kubazip 0.1.19#1 A portable, simple zip library written in C
On a side note, if this library were a perfect match to the libzip.org API,
I think the main reason why people use this library is becuase:
- it's tiny (can be compiled into the project)
- clear/intuitive API
- maybe becuase of merge-buffers into one entry feature
So, I do not see the point to be compatible with zlib.