[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unknown references -> QT 2.0.x



Pierre Phaneuf wrote:

> > if I link a programme for QT 2 the linker can't find references for the
> > PNG library:
> >
> >         deflate
> >         inflate
> >         inflateInit_
> >         crc32
> >         deflateInit2_
> >         inflateReset
> >         deflateReset
> >         inflateEnd
> >         deflateEnd
> >
> > The programme is linked like following:
> >
> >  gcc -lqt -lXext -L/usr/lib/qt/lib -L/usr/lib/X11 -L/usr/X11/lib test.o
> > -o test
> 
> Those are from zlib. Add "-lz" to your command line.

By the way, if this depency is from Qt, there is a probably a build
problem somewhere on your system (maybe a bug in the distribution). On
my (Red Hat) system, "-lqt" automatically pulls in libpng.so, which
automatically pulls in libz.so without anything needed on the compiler
command line.

-- 
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi