The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly. |
Home Writing PNG Images writepng_version_info() | |
writepng_version_info()#include "png.h" /* libpng header; includes zlib.h */ #include "writepng.h" /* typedefs, common macros, public prototypes */ void writepng_version_info() { fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver); fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", ZLIB_VERSION, zlib_version); } writepng_version_info() simply indicates the versions of libpng and zlib with which the application was compiled, as well as the versions it happens to be using at runtime. Ideally the two pairs of version numbers will match--in the case of a statically linked executable, they always will--but if the program was dynamically linked, it is possible that the program loader has found either an older or a newer version of one or both libraries, in which case strange problems may arise later. Making this information easily available to the user, whether in a simple text-mode usage screen as I do here or via a windowed ``about box'' or even a fancy, automated, troubleshooting function, can be helpful in dealing with the bug reports that inevitably show up sooner or later.
|
|
Home Writing PNG Images writepng_version_info() |