[Qt-interest] problems the libpng and QT

Constantin Makshin dinosaur-rus at users.sourceforge.net
Fri Oct 9 20:15:55 CEST 2009


These functions are from zlib. Try adding "-lz" to your linker options.

On Fri, 09 Oct 2009 22:07:46 +0400, Sarvesh Saran  
<Sarvesh.Saran at synopsys.com> wrote:
> Hi,
>
> I have a QT application which gives the following error during linking.
>
> remote/srm213/clientstore/ekki_qt_qscc/4.4.3/20081117/lib-amd64/libQtGui-O.a(png.o):  
> In function `png_calculate_crc':
> png.c:(.text+0xa69): undefined reference to `crc32'
> /remote/srm213/clientstore/ekki_qt_qscc/4.4.3/20081117/lib-amd64/libQtGui-O.a(png.o):  
> In function `png_reset_crc':
> png.c:(.text+0xa9b): undefined reference to `crc32'
> /remote/srm213/clientstore/ekki_qt_qscc/4.4.3/20081117/lib-amd64/libQtGui-O.a(png.o):  
> In function `png_reset_zstream':
> png.c:(.text+0x8d): undefined reference to `inflateReset'
> /remote/srm213/clientstore/ekki_qt_qscc/4.4.3/20081117/lib-amd64/libQtGui-O.a(pngread.o):  
> In function `png_read_destroy':
> pngread.c:(.text+0x226): undefined reference to `inflateEnd'
> /remote/srm213/clientstore/ekki_qt_qscc/4.4.3/20081117/lib-amd64/libQtGui-O.a(pngread.o):  
> In function `png_read_row':
> pngread.c:(.text+0x910): undefined reference to `inflate'
> /remote/srm213/clientstore/ekki_qt_qscc/4.4.3/20081117/lib-amd64/libQtGui-O.a(pngread.o):  
> In function `png_read_init_3':
> pngread.c:(.text+0x1845): undefined reference to `inflateInit_'
> /remote/srm213/clientstore/ekki_qt_qscc/4.4.3/20081117/lib-amd64/libQtGui-O.a(pngread.o):  
> In function `png_create_read_struct_2':
> pngread.c:(.text+0x1c67): undefined reference to `inflateInit_'
>
> however sometimes I don't get this error..its rather sporadic.
>
> Will adding -lpng to the build do the trick?  why is this problem not  
> consistent? ( I'm not using qmake....)
>
>
> Thanks,
> Sarvesh

-- 
Constantin Makshin



More information about the Qt-interest-old mailing list