Compile and use libpng and zlib in Visual Studio

Source: Internet
Author: User

Libpng is used for image processing, and zlib is used for compression. The two are closely related. libpng depends on zlib.


Compilation Library:

1. First download the libpng-1.5.12.tar.gz ( and libz (, extract LibPNG, such as c: \ workspace \ libpng-1.5.12 \.

2. Decompress libz and rename zlib to the libpng directory of the same level, such as c: \ workspace \ zlib.

3. Enter libpng \ projects \ visualc71 \ and open the project file with Visual Studio. The solution has three sub-projects: LibPNG, pngtest, and zlib. Directly compile the file. The zlib1d. dll, libpng15d. dll, LibPNG. Lib, zlib, and other library files will be generated under the win32_dll_debug directory and win32_dll_debug \ zlib directory.


For projects that need to use these two databases, three things need to be done:

1. Project property-> Configuration properties-> C/C ++/General-> additional include directories Add the directories containing header files such as PNG. h

2. Add zlib. lib and LibPNG. lib to linker-> input-> additional dependencies.

3. In configuration properties-> VC ++ directories-> library directories, add the directories zlib. lib and LibPNG. Lib.




Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.