|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
VisualStudio instructions
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
libpng version 1.6.21 - January 15, 2016
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
This code is released under the libpng license.
|
|
fukasawa |
e60969 |
For conditions of distribution and use, see the disclaimer
|
|
fukasawa |
e60969 |
and license in png.h
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
This directory contains support for building libpng under MicroSoft
|
|
fukasawa |
e60969 |
VisualStudio 2010. It may also work under later versions of VisualStudio.
|
|
fukasawa |
e60969 |
You should be familiar with VisualStudio before using this directory.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Initial preparations
|
|
fukasawa |
e60969 |
====================
|
|
fukasawa |
e60969 |
You must enter some information in zlib.props before attempting to build
|
|
fukasawa |
e60969 |
with this 'solution'. Please read and edit zlib.props first. You will
|
|
fukasawa |
e60969 |
probably not be familiar with the contents of zlib.props - do not worry,
|
|
fukasawa |
e60969 |
it is mostly harmless.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
This is all you need to do to build the 'release' and 'release library'
|
|
fukasawa |
e60969 |
configurations.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Debugging
|
|
fukasawa |
e60969 |
=========
|
|
fukasawa |
e60969 |
The release configurations default to /Ox optimization. Full debugging
|
|
fukasawa |
e60969 |
information is produced (in the .pdb), but if you encounter a problem the
|
|
fukasawa |
e60969 |
optimization may make it difficult to debug. Simply rebuild with a lower
|
|
fukasawa |
e60969 |
optimization level (e.g. /Od.)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Linking your application
|
|
fukasawa |
e60969 |
========================
|
|
fukasawa |
e60969 |
Normally you should link against the 'release' configuration. This builds a
|
|
fukasawa |
e60969 |
DLL for libpng with the default runtime options used by Visual Studio 2010.
|
|
fukasawa |
e60969 |
In particular the runtime library is the "MultiThreaded DLL" version.
|
|
fukasawa |
e60969 |
If you use Visual Studio defaults to build your application you will have no
|
|
fukasawa |
e60969 |
problems.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
If you don't use the Visual Studio defaults your application must still be
|
|
fukasawa |
e60969 |
built with the default runtime option (/MD). If, for some reason, it is not
|
|
fukasawa |
e60969 |
then your application will crash inside libpng16.dll as soon as libpng
|
|
fukasawa |
e60969 |
tries to read from a file handle you pass in.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
If you do not want to use the DLL, for example for a very small application,
|
|
fukasawa |
e60969 |
the 'release library' configuration may be more appropriate. This is built
|
|
fukasawa |
e60969 |
with a non-standard runtime library - the "MultiThreaded" version. When you
|
|
fukasawa |
e60969 |
build your application it must be compiled with this option (/MT), otherwise
|
|
fukasawa |
e60969 |
it will not build (if you are lucky) or crash (if you are not.) See the
|
|
fukasawa |
e60969 |
WARNING file that is distributed along with this readme.txt.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Stop reading here
|
|
fukasawa |
e60969 |
=================
|
|
fukasawa |
e60969 |
You have enough information to build a working application.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Debug versions have limited support
|
|
fukasawa |
e60969 |
===================================
|
|
fukasawa |
e60969 |
This solution includes limited support for debug versions of libpng. You
|
|
fukasawa |
e60969 |
do not need these unless your own solution itself uses debug builds (it is
|
|
fukasawa |
e60969 |
far more effective to debug on the release builds, there is no point building
|
|
fukasawa |
e60969 |
a special debug build unless you have heap corruption problems that you can't
|
|
fukasawa |
e60969 |
track down.)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
The debug build of libpng is minimally supported. Support for debug builds of
|
|
fukasawa |
e60969 |
zlib is also minimal. You really don't want to do this.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
WARNING
|
|
fukasawa |
e60969 |
=======
|
|
fukasawa |
e60969 |
Libpng 1.6.x does not use the default run-time library when building static
|
|
fukasawa |
e60969 |
library builds of libpng; instead of the shared DLL runtime it uses a static
|
|
fukasawa |
e60969 |
runtime. If you need to change this make sure to change the setting on all the
|
|
fukasawa |
e60969 |
relevant projects:
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
libpng
|
|
fukasawa |
e60969 |
zlib
|
|
fukasawa |
e60969 |
all the test programs
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
The runtime library settings for each build are as follows:
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Release Debug
|
|
fukasawa |
e60969 |
DLL /MD /MDd
|
|
fukasawa |
e60969 |
Library /MT /MTd
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
NOTICE that libpng 1.5.x erroneously used /MD for Debug DLL builds; if you used
|
|
fukasawa |
e60969 |
the debug builds in your app and you changed your app to use /MD you will need
|
|
fukasawa |
e60969 |
to change it back to /MDd for libpng 1.6.0 and later.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
The Visual Studio 2010 defaults for a Win32 DLL or Static Library project are
|
|
fukasawa |
e60969 |
as follows:
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Release Debug
|
|
fukasawa |
e60969 |
DLL /MD /MDd
|
|
fukasawa |
e60969 |
Static Library /MD /MDd
|
|
fukasawa |
e60969 |
|