Zitat Zitat von tecfan69 Beitrag anzeigen
epng.cpp:55:22: Fehler: invalid use of incomplete type »struct png_struct«
/home/developer/DuckboxSH4/tdt/tdt/tufsbox/cdkroot/usr/include/libpng15/png.h:825:16: Fehler: forward declaration of »struct png_struct«
epng.cpp: In Funktion »int savePNG(const char*, gPixmap*)«:
epng.cpp:265:22: Fehler: invalid use of incomplete type »struct png_struct«
/home/developer/DuckboxSH4/tdt/tdt/tufsbox/cdkroot/usr/include/libpng15/png.h:825:16: Fehler: forward declaration of »struct png_struct«
Zeile ist

setjmp(png_ptr->jmpbuf)

Das funktioniert mit libpng ab 1.5 nicht mehr. Dafür gibt es jetzt png_jmpbuf, sprich setjmp(png_jmpbuf(png_ptr)). Das gleiche gilt für io_ptr.

Siehe auf der libpng Seite:

The libpng 1.5.x series continues the evolution of the libpng API, finally hiding the contents of the venerable and hoary png_struct and png_info data structures inside private (i.e., non-installed) header files. Instead of direct struct-access, applications should be using the various png_get_xxx() and png_set_xxx() accessor functions, which have existed for almost as long as libpng itself. (Apps that compiled against libpng 1.4 without warnings about deprecated features should happily compile against 1.5, too.)