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:

  https://sourceforge.net/projects/ezwinports/files/libpng-1.6.12-w32-bin.zip/download

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.
http://sdm.link/attshape
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
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:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe