ReadUseEx.txt

Information on using examples in "windll/examples/vc10".

This directory contains MS Visual Studio examples for using the new
Zip 3.1 zip32_lib.lib, zip32_libd.lib, zip32_dll.lib, and zip32_dll.dll
static and dynamic libraries.

See WhatsNew_DLL_LIB.txt and the comments in the api.h and api.c source
files for details on the updated LIB/DLL interfaces.

The Zip 3.1 libraries are not backward compatible with either the
Zip 2.32 or the Zip 3.0 libraries.  They are also not compatible with
libraries provided with previous Zip 3.1 betas.  This was necessary to
finally clean up the interface to make it more consistent and intuitive
(hopefully) and to add in hooks for later expansion.  These libraries
also have an updated version reporting feature that can be used to verify
compatibility and confirm supported features at run time.  See the example
code in the windll/examples directories for how to use these new features.

The four libraries built using the zip32_lib and zip32_dll projects in
the windll/vc10 directory are:

Static linking:

  zip32_lib.lib    - This is the RELEASE version of the static library.

  zip32_libd.lib   - This is the DEBUG version of the static library.

  NOTE:  Be sure to use the DEBUG library if the app is compiled with
         DEBUG, and the RELEASE library if the app is compiled with
         RELEASE.  Mixing DEBUG and RELEASE versions of the app and
         static library can result in unexpected crashes.

Dynamic linking:

  zip32_dll.lib    - This is a static library that calls the DLL.  Use
                     this one to create the DLL references in your
                     DLL project.

  zip32_dll.dll    - This is the dynamic library.  When you link to
                     zip32_dll.lib at link time, zip32_dll.dll needs to
                     be in the project directory or in a directory
                     listed in PATH.  You can also load this dynamically
                     without using zip32_dll.lib to reference it.

On Windows, the Zip libraries include bzip2.  Previously a user project
needed to link to both the Zip static library and the bzip2 library
(libbz2.lib).  Now linking just to the Zip static library is sufficient.

It should be simple to convert a program using the old libraries to
using the Zip 3.1 libraries.  However, for a zip32.dll compatible replacement
use the dll and lib compiled from Zip 2.32 (released separately).

Note that the files may be saved in Unix format with carriage returns
stripped.  These must be restored before the project can be successfully
used with older versions of Visual Studio.  Visual Studio 2010 seems OK
with these line endings.

Enjoy!

13 September 2015

