Card in: Compile qtbase/src/gui/image/qpnghandler.cpp times wrong:
. obj/qpnghandler.o:in function ' Qpnghandlerprivate::readpngheader () ':
Qpnghandler.cpp: (. text+0xbe2): Undefined reference to ' PNG_SET_LONGJMP_FN '
. obj/qpnghandler.o:in function ' Qpngimagewriter::writeimage (qimage const&, int, QString const&, int, int) ':
Qpnghandler.cpp: (. text+0x273b): Undefined reference to ' PNG_SET_LONGJMP_FN '
. obj/qpnghandler.o:in function ' Qpnghandlerprivate::readpngimage (qimage*) ':
Qpnghandler.cpp: (. text+0x30cc): Undefined reference to ' PNG_SET_LONGJMP_FN '
Collect2:ld returned 1 exit status
I thought it was not added-lpng library, in the makefile add-lpng, the results are still not resolved.
Open Qtbase/src/gui/image/qpnghandler.cpp File:
#if PNG_LIBPNG_VER >= 10400 && PNG_LIBPNG_VER <= 10502 && defined (png_pedantic_warnings_supported)/* versions 1.4.0 to 1.5.2 of libpng declare png_ Longjmp_ptr to have a noreturn attribute if png_pedantic_ warnings_supported is enabled, but most declarations of longjmp in the wild do not add this attribute. This causes problems when the png_jmpbuf macro expands &NBSP;TO&NBSP;CALLING&NBSP;PNG_SET_LONGJMP_FN&NBSP;WITH&NBSP;A&NBSP;MISMATCHED&NBSP;&NBSP;&NBSP;&NBSP;LONGJMP, as compilers such as clang will treat this as an error . To work around this we override the png_jmpbuf macro to cast longjmp to a png_longjmp_ptr.*/# undef png_jmpbuf # ifdef png_setjmp_supported# define png_ Jmpbuf (png_ptr) (*png_set_longjmp _FN ((png_ptr), (png_longjmp_ptr) longjmp, sizeof (jmp_buf))) # else# define png_jmpbuf (png_ptr) (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) # endif#endif
What should I do with it?
Here are the calls to Png_jmpbuf:
if (setjmp (Png_jmpbuf (png_ptr))) {png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); png_ptr = 0; Amp.deallocate (); state = Error; return false; }
Attempt to install PYQT5 failed