YannikL / libpng-VisualStudio2019

Building libpng with Visual Studio 2019

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building libpng with Visual Studio 2019

Precondition

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
    <ZLibSrcDir>..\..\..\..\zlib</ZLibSrcDir>
    to
    <ZLibSrcDir>..\..\..\..\zlib-1.2.11</ZLibSrcDir>

  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 PropertiesC/C++GeneralTreat Warnings As Errors
      Change "$(TreatWarningAsError)" to "No (/W-)"
    • Editting each configration.
      Configuration PropertiesC/C++PreprocessorPreprocessor Definitions
      Remove "Z_SOLO;"
  5. Build
    Set Solution ConfigrationsRelease Library
    Menu BuildBuld Solution

Completed! 😄

About

Building libpng with Visual Studio 2019


Languages

Language:C 71.8%Language:Shell 7.8%Language:Roff 5.1%Language:Makefile 3.1%Language:Assembly 2.7%Language:Ada 1.6%Language:C++ 1.5%Language:Pascal 1.4%Language:C# 1.0%Language:CMake 1.0%Language:Awk 0.8%Language:DIGITAL Command Language 0.7%Language:Objective-C 0.6%Language:HTML 0.5%Language:M4 0.4%Language:Perl 0.1%Language:Batchfile 0.1%Language:Module Management System 0.1%Language:SAS 0.0%Language:Dockerfile 0.0%