Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 2-Apr-13 2:46am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 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)

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 105
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100