List Archive


Thread Index


From: Lisa Matias <>
Subject: Unable to build working Win32 libzip-1.1.3
Date: Tue, 10 Jan 2017 17:41:01 -0800

Has anyone had any success in building a Win32 (32 bit) port of libzip?

I have VC++ (from Visual Studio 9 2008) with cmake & cmake-gui, and zlib (zlibd.lib version 1.2.9) installed, and although I can build the libzip libraries, there are unusable when I link them with any application.

Specifically when I run any subsystem console application linked with zipstatic.lib or zip.lib + zip.dll, I get the following error:

The application has failed to start because its side-by-side configuration is incorrect.

Which in the event viewer shows as:

Activation context generation failed for "Z:\myziptest.exe.Manifest". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

Note that after getting this error, I have reinstalled the most current version of "vcredist_x86.exe", which is the Microsoft Visual C++ 2008 Redistributable Package (x86), but I am still getting this error.

Does anyone have any detailed instructions on how to build libzip-1.1.3 for 32-bit windows?  After many attempts, I cannot get a proper build for it.

Alternatively, if anyone was successful in building for Win32, could they please share the binaries?  Release static binaries with "zipstatic.lib" is preferred, but shared binaries with "zip.lib" & "zip.dll" is acceptable.

On a separate note, 

But ziptool does not link for me:

[ 88%] Linking C executable ziptool.exe
ziptool.c.obj : error LNK2019: unresolved external symbol _strtoll referenced in function _add_file
ziptool.c.obj : error LNK2019: unresolved external symbol _strtoull referenced in function _add_file
ziptool.exe : fatal error LNK1120: 2 unresolved externals

However starting in line 43 of src/ziptool.c if I change:

#ifdef _WIN32
/* WIN32 needs <fcntl.h> for _O_BINARY */
#include <fcntl.h>

to this:

#ifdef _WIN32
/* WIN32 needs <fcntl.h> for _O_BINARY */
#include <fcntl.h>
#define strtoull strtoul
#define strtoll  strtol

ziptool does build successfully.

But of course it still does not run, and gets the same side-by-side configuration error.

Note that I was able to successful build zlib and openssl, and link them into working console Win32 applications.  But I am only experiencing issues with libzip.

Thank you in advance.


Made by MHonArc.