Web lists-archives.com

Re: [Mingw-users] Using mingw's libpng?

> Date: Fri, 01 Jul 2016 18:13:23 -0700
> From: mathog <mathog@xxxxxxxxxxx>
> Are there some special command line switches needed to build a program 
> with the libpng dll in mingw?

That should be stated in the pkg-config file that comes with the
libpng distribution you are using.

> Using this test program:
>    http://zarb.org/~gc/resource/libpng-short-example.c
> on a Centos box:
> gcc -o png-test libpng-short-example.c -lpng -lz -lm
> ./png-test testcase.png foo.png
> and the program ran.  It dumps the data pixel by pixel and copies the 
> image
> from the first to the 2nd file.
> However on Mingw with the same compile line and input data it does:
> $ ./png-test testcase.png killme.png
> This application has requested the Runtime to terminate it in an unusual 
> way.
> Please contact the application's support team for more information.
> libpng error: invalid after png_start_read_image or png_read_update_info
> [read_png_file] Error during read_image

Before you make any conclusions, please try this build of libpng:


The switches required to compile and link against the library are
specified in the file lib/pkgconfig/libpng.pc included with this
build, and all the dependency DLLs are also included.

Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe