Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use the library with static linking? #10

Closed
xplicit opened this issue Jun 24, 2017 · 3 comments
Closed

Is it possible to use the library with static linking? #10

xplicit opened this issue Jun 24, 2017 · 3 comments
Assignees

Comments

@xplicit
Copy link

xplicit commented Jun 24, 2017

I'm looking for a static library which allows to unzip files with password. From the description of bit7z I see it supports static linking and extracting files with password but from docs I noticed that I have to put 7za.dll into the running directory. Does this library support fully static linking? I'd like to compile single exe without additional dll dependencies.

@rikyoz
Copy link
Owner

rikyoz commented Jun 24, 2017

Unfortunately no, it doesn't support fully static linking. bit7z does support static linking (actually, it is meant to be linked only statically!), but it uses dynamic linking to access the functionalities of the 7-zip dlls, given that it was designed to be a simple interface to the latter!

@rikyoz rikyoz self-assigned this Jun 24, 2017
@rikyoz rikyoz closed this as completed Jun 25, 2017
@xplicit
Copy link
Author

xplicit commented Jun 27, 2017

It would be great to have this ability because API of bit7z is really simple. As far I understand 7-zip also have the ability to statically link libs. If I'm not wrong this can be used to extend bit7z library.

@rikyoz
Copy link
Owner

rikyoz commented Jun 28, 2017

Yeah, technically it should be possible to extend bit7z to support fully static linking!
The problem is that I still need to figure out how different is the usage of 7-zip code when it is statically linked: unfortunately the 7-zip code is really a mess and it is mostly undocumented so it's not so easy (at least to me)! I feel like it would probably require too many changes in the actual code and currently I'm quite busy on other jobs, but when I'll find some time I'll try to figure this out.
Nevertheless I don't think that I'll make it available for the next minor version (v2.2). If the changes to do are too big, probably I will release it in a v3.0 version (with other major improvements that I've already planned).
P.S. I'll reopen this issue in the event that I have managed to solve it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants