[Mingw-users] Using mingw's libpng?
- Date: Fri, 01 Jul 2016 18:13:23 -0700
- From: mathog <mathog@xxxxxxxxxxx>
- Subject: [Mingw-users] Using mingw's libpng?
Are there some special command line switches needed to build a program
with the libpng dll in mingw?
Using this test program:
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
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
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
This was done on two Mingw systems, an old XP one with a years old
Mingw, and a Windows 7 that was installed a month or so ago with the
current Mingw. Both behaved exactly the same way. They also did the
same thing with "-lpng16" instead of "-lpng".
This inquiry started when a much more complex program was crashing at
which led to
which in turn led to this:
Is there maybe a similar issue here? What flags were used when libpng
Inkscape builds in this environment, and its png works, but it is worth
noting that it uses a different libpng, from its own devlibs package,
not the one that comes with Mingw.
Manager, Sequence Analysis Facility, Biology Division, Caltech
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: