libzip with Visual Studio 2010
Edit:
Before starting on the answer provided here, it appears that this may no longer be an issue going by @Thomas Klausner's answer below.
The following should get you a VS10 solution:
If you've not already done so, install CMake
Download and extract zlib to e.g.
C:\devel
. The download links are about halfway down the homepage. Currently this provides zlib version 1.2.7.To work around this CMake bug which affects 64-bit Windows only, add
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC)
set_target_properties(zlibstatic PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
endif()to the end of C:\devel\zlib-1.2.7\CMakeLists.txt
Download and extract libzip to e.g.
C:\devel
In a VS10 command prompt,
cd C:\devel\zlib-1.2.7
mkdir build && cd build
cmake .. -G"Visual Studio 10" -DCMAKE_INSTALL_PREFIX="C:\devel\installed\zlib"
This sets the install path toC:\devel\installed\zlib
rather than the defaultC:\Program Files\zlib
. For 64-bit Windows, use"Visual Studio 10 Win64"
as the-G
parameter.msbuild /P:Configuration=Debug INSTALL.vcxproj
msbuild /P:Configuration=Release INSTALL.vcxproj
cd C:\devel\libzip-0.10.1
mkdir build && cd build
cmake .. -G"Visual Studio 10" -DCMAKE_PREFIX_PATH="C:\devel\installed\zlib"
Set the path to wherever you installed zlib so that CMake can find zlib's include files and libs. Again, for 64-bit Windows, use"Visual Studio 10 Win64"
as the-G
parameter.
This should result in C:\devel\libzip-0.10.1\build\libzip.sln
. It looks like there are a few POSIX-specific problems in the code, but they should hopefully be fairly easy to resolve (e.g. in zipconf.h #include <inttypes.h>
needs replaced with #include <stdint.h>
; there are some snprintf
calls needing replaced e.g. with _snprintf
).
Static libpng link with visual studio 2010
To make all your libraries static, you would have to recompile everything "from scratch" as static libraries.
This simply means you should create a set of projects for each library you have in your sequence and set the output type to static library.
After that you should eliminate library dependencies between the libraries themselves (this means you should link the output of some projects to another projects, e.g. if your "libpng" library uses "libzip", it means you should first compile the "libzip" and link that output (static library) to your "libpng" project.
In the very end you would have a big set of static libraries compiled for your platform, which you can use in your projects.
Also to mention, try googling more carefully. I'm sure someone has this done and you would probably need to download a package of .lib files for your platform (I know that very often the "dev" bundle of libraries only includes an import library paired with appropriate .dll file, but there are a lot of enthusiasts like you :)
Extract files from zip
zLib is your best bet. It can be found here: zLib website.
Look in the contrib\vstudio
folder for the visual studio projects. The easiest way to use it, is via minizip, located in the contrib\minizip
folder.
Related Topics
When Do I Use Fabs and When Is It Sufficient to Use Std::Abs
Visual Studio: Link:Fatal Error Lnk1181: Cannot Open Input File
Is There Any Advantage to Using Pow(X,2) Instead of X*X, with X Double
Is It Safe to Use the "This" Pointer in an Initialization List
Cpython Is Bytecode Interpreter
How to Sleep or Pause a Pthread in C on Linux
Cannot Open Include File: 'Ctype.H': No Such File or Directory
How to Store Array in One Column in SQLite3
Do I Really Have to Worry About Alignment When Using Placement New Operator
C++ Implementing Timed Callback Function
Why Does Enable_If_T in Template Arguments Complains About Redefinitions
Variable Length Arrays (Vla) in C and C++
How to Wait on Multiple Condition Variables in C++11
Static_Assert on Initializer_List::Size()
Why Does Int Main() {} Compile
What Is the Performance Implication of Converting to Bool in C++
How to Fix: /Usr/Lib/Libstdc++.So.6: Version 'Glibcxx_3.4.15' Not Found