# libpng-VisualStudio2019 **Repository Path**: bxwan/libpng-VisualStudio2019 ## Basic Information - **Project Name**: libpng-VisualStudio2019 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-07 - **Last Updated**: 2025-07-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # **Building libpng with Visual Studio 2019** ## Precondition - zlib ver1.2.11: [https://zlib.net/](https://zlib.net/) - libping ver1.6.37: [http://www.libpng.org/pub/png/libpng.html](http://www.libpng.org/pub/png/libpng.html) Unzip these files in directory "build". The directory structure is here. build # root for bulding ├─ lpng1637 # libpng └─ zlib-1.2.11 # zlib ## Build libpng 1. **Edit "zlib.props"**
Open file "build\lpng1637\projects\vstudio\zlib.props" Change line #34
`..\..\..\..\zlib`
to
`..\..\..\..\zlib-1.2.11`
2. **Create zconf.h**
Duplicate the file "build\zlib-1.2.11\zconf.h.included" and rename to "zconf.h" 3. **Open Solution file**
The solution file of Visual Studio is here "build\lpng1637\projects\vstudio\vstudio.sln"
Some warning daialogs may be shown. Then click OK button on all daialogs.
It includes 7 projects as following. - List item - libpng - pnglibconf - pngstest - pngtest - pngunknown - pngvalid - zlib 4. **Edit Property Pages**
Open Property Page of "zlib" project. Edit as below.
- Editting with "All Configurations".
`Configuration Properties` → `C/C++` → `General` → `Treat Warnings As Errors`
Change **"$(TreatWarningAsError)"** to **"No (/W-)"** - Editting each configration.
`Configuration Properties` → `C/C++` → `Preprocessor` → `Preprocessor Definitions`
Remove **"Z_SOLO;"** 5. **Build**
Set `Solution Configrations` → `Release Library`
Menu `Build` → `Buld Solution` Completed\! :smile: