Click here to Skip to main content
15,880,725 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to build a little application using libzip library. I downloaded and compiled libzip with assistance of this article:

http://stackoverflow.com/questions/10507893/libzip-with-visual-studio-2010

The problem is that it compiles libs dynamically, requiring both zlib.dll and zip.dll to be present. I want to compile the application completely statically, so no additional dlls will be required. does someone know how I can do that?

Thanks!
Posted

1 solution

You can only do that if you have the complete source code for everything you want in your final exe.
If you have then the simplistic answer is to put all the source code in one project and just build the one exe.
You could of course build the zlib and zip parts as static libraries and then link these into your exe.
It looks from the item you linked as if you're using CMake to do this. If that's the case you really need to put CMake in the title of the question or at least make it very clear if that's what you want help with CMake is pretty specialist.

Otherwise however you do this you're going to need to create one or more new 'projects' of some form, Make file or IDE to get the job done. Do one for an essentially empty executable or 'Hello World' application first and once that works perhaps try zlib as a static library.
Post the details if you get stuck.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Apr-13 9:51am    
5ed. And the source code of LibZip is available, of course.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900