1. Official Website
Http://zlib.net/zlib128.zip
2. decompress the package to the specified directory.
Example: e: \ zlib-1.2.8
The contents of the Directory are as follows:
3. Find Visual Studio command prompt (2010) in the Start Menu.
Click to open
4. Use commands to enter the decompressed directory
5. Then, enter E: \ zlib-1.2.8 \ contrib
Use Windows Resource Manager to open the corresponding directory. The content is as follows:
Select different compiling environments for different environments.
6. Select a 32-bit environment, so go to The masmx86 directory.
7. Execute bld_ml32.bat
8. Open E: \ zlib-1.2.8 \ contrib \ vstudio \ VC10 \ zlibvc. sln with vs2010
There are 6 projects, which are explained as follows:
Zlibvc is a dynamic library
Zlibstat is a static library.
Test static library
Testzlibdll test dynamic library
The other two examples demonstrate the zip unzip function.
9. Compile the last two zlibvc zlibstat
You need to make the following configuration (in fact, this is already the case by default, you can ignore it)
10. The corresponding library generated at this time is as follows:
Static Library
Dynamic library
When compiling several other projects, make the following Configuration:
11. The rest is the right-click compilation and generate it. Generally, there will be no problems.
Dynamic Static library generated by zlib-1.2.8 compiled by vs2010