| 1 |
|
| 2 |
Installing ZLIB1.DLL |
| 3 |
==================== |
| 4 |
Copy ZLIB1.DLL to the SYSTEM or the SYSTEM32 directory. |
| 5 |
|
| 6 |
If you want to install the 32-bit dll on a 64-bit |
| 7 |
machine, use the SysWOW64 directory instead. |
| 8 |
|
| 9 |
|
| 10 |
Using ZLIB1.DLL with Microsoft Visual C++ |
| 11 |
========================================= |
| 12 |
1. Install the supplied header files "zlib.h" and "zconf.h" |
| 13 |
into a directory found in the INCLUDE path list. |
| 14 |
|
| 15 |
2. Install the supplied library file "zdll.lib" into a |
| 16 |
directory found in the LIB path list. |
| 17 |
|
| 18 |
3. Add "zdll.lib" to your project. |
| 19 |
|
| 20 |
|
| 21 |
Using ZLIB1.DLL with gcc/MinGW |
| 22 |
============================== |
| 23 |
1. Install the supplied header files "zlib.h" and "zconf.h" |
| 24 |
into the INCLUDE directory. |
| 25 |
|
| 26 |
2. (32-bit): Copy the supplied library file "zdll.lib" to "libzdll.a": |
| 27 |
cp lib/zdll.lib lib/libzdll.a |
| 28 |
|
| 29 |
OR |
| 30 |
|
| 31 |
2'. (64-bit): Copy the supplied library file "libz.dll.a" to "libzdll.a": |
| 32 |
cp lib/libz.dll.a lib/libzdll.a |
| 33 |
|
| 34 |
OR |
| 35 |
|
| 36 |
2'' Build the import library from the supplied "zlib.def": |
| 37 |
dlltool -D zlib1.dll -d lib/zlib.def -l lib/libzdll.a |
| 38 |
|
| 39 |
3. Install "libzdll.a" into the LIB directory. |
| 40 |
|
| 41 |
4. Add "libzdll.a" to your project, or use the -lzdll option. |
| 42 |
|
| 43 |
|
| 44 |
Using ZLIB1.DLL with gcc/Cygwin |
| 45 |
=============================== |
| 46 |
ZLIB1.DLL is not designed to work with Cygwin. The Cygwin |
| 47 |
system has its own DLL build of zlib, named CYGZ.DLL. |
| 48 |
|
| 49 |
|
| 50 |
Using ZLIB1.DLL with Borland C++ |
| 51 |
================================ |
| 52 |
1. Install the supplied header files "zlib.h" and "zconf.h" |
| 53 |
into a directory found in the INCLUDE path list. |
| 54 |
|
| 55 |
2. Build the import library using the IMPLIB tool: |
| 56 |
implib -a -c -f lib\zdllbor.lib zlib1.dll |
| 57 |
|
| 58 |
OR |
| 59 |
|
| 60 |
2' Convert the supplied library file "zdll.lib" to OMF format, |
| 61 |
using the COFF2OMF tool: |
| 62 |
coff2omf lib\zdll.lib lib\zdllbor.lib |
| 63 |
|
| 64 |
3. Install "zdllbor.lib" into a directory found in the LIB path |
| 65 |
list. |
| 66 |
|
| 67 |
4. Add "zdllbor.lib" to your project. |
| 68 |
|
| 69 |
Notes: |
| 70 |
- The modules that are linked with "zdllbor.lib" must be compiled |
| 71 |
using a 4-byte alignment (option -a): |
| 72 |
bcc32 -a -c myprog.c |
| 73 |
bcc32 myprog.obj zdllbor.lib |
| 74 |
- If you wish, you may use "zlib1.lib" instead of "zdllbor.lib". |
| 75 |
|
| 76 |
|
| 77 |
Rebuilding ZLIB1.DLL |
| 78 |
==================== |
| 79 |
Depending on your build environment, use the appropriate |
| 80 |
makefile from the win32/ directory, found in the zlib source |
| 81 |
distribution. |
| 82 |
|
| 83 |
Your custom build has to comply with the requirements stated |
| 84 |
in DLL_FAQ.txt, including (but not limited to) the following: |
| 85 |
- It must be built from an unaltered zlib source distribution. |
| 86 |
- It must be linked to MSVCRT.DLL. |
| 87 |
- The macros that compile out certain portions of the zlib |
| 88 |
code (such as NO_GZCOMPRESS, NO_GZIP) must not be enabled. |
| 89 |
- The ZLIB_WINAPI macro must not be enabled. |
| 90 |
|
| 91 |
Furthermore, it has to run successfully with the test suite |
| 92 |
found in this package. |
| 93 |
|
| 94 |
It is recommended, however, to use the supplied ZLIB1.DLL, |
| 95 |
instead of rebuilding it yourself. You should rebuild it |
| 96 |
only if you have a special reason. |
| 97 |
|