rikyoz / bit7z

A C++ static library offering a clean and simple interface to the 7-zip shared libraries.
https://rikyoz.github.io/bit7z
Mozilla Public License 2.0
602 stars 110 forks source link

[Feature Request]: Link static 7z lib #216

Closed hcaihao closed 1 month ago

hcaihao commented 1 month ago

Feature description

Can bit7z link static 7z lib, I want build exe only application.

Additional context

MT build with static 7z lib.

Code of Conduct

rikyoz commented 1 month ago

Hi! Bit7z doesn't currently support static linking of 7-Zip. I will definitely try to add support for it, but it will require many changes to both the public API and the internals of the library, so it probably won't come soon (maybe in a v5).

Also, I'm not a lawyer, but as far as I know, statically linking 7-Zip has some licensing implications for the end application. Specifically, 7-Zip is licensed under the GNU LGPL, so if you statically link its source to your application, the latter must also be licensed under the GNU GPL/LGPL due to the virality of (L)GPL licenses. This does not apply to programs that currently use bit7z, as they don't use any code from 7-Zip (except for its public interfaces) and will dynamically use the 7-Zip DLLs.