> People using gtk and imlib are supposed to use gtk-config and > imlib-config to get the right compile and link flags. Now look > at this: > > [tornado;~/sources/original/dpkg/dpkg]-10> imlib-config --libs > -L/usr/lib -lImlib -ljpeg -ltiff -lungif -lpng -lz -lm -lXext > -L/usr/X11R6/lib -lSM -lICE -lXext -lX11 > > This is extremely silly, as we can see: > > [lightning;~]-10> objdump -p /usr/lib/libImlib.so.1 | grep NEEDED > NEEDED libjpeg.so.62 > NEEDED libtiff.so.3 > NEEDED libungif.so.3 > NEEDED libpng.so.2 > NEEDED libz.so.1 > NEEDED libm.so.6 > NEEDED libc.so.6 > > So imlib-config shouldn't list any of those libraries since libImlib > is already linked to them. (I'm assuming we have a sane dynamic linker > here, for other OSes this might not be the case). I'm also willing to > bet that libImlib probably should be linked to all those X > libraries as > well so the only thing you need to do if you link with > libImlib is only > do -lImlib. Somehow I have the nasty feeling though that the GNOME > developers are not very willing to clean up their act and correct this > though..
This is not true. Direct dependencies and the libraries needed for compiling are two different things. Unless the linker has become extremely smart, it is still necessary to specify all libraries a program needs on the command line. While it may be true that it is sufficient to be *dependent* only on imlib, it is still necessary to specify all those other implicit libraries to the linker. The linker is not smart enough to follow all dependencies that stem from linking to a library. What the linker needs is a list of all the files it needs to fixup the symbol table. It finds those in a .lib file that is present for every .so file. Ronald van Loon > > Wichert. > > -- > ________________________________________________________________ > / Generally uninteresting signature - ignore at your convenience \ > | [EMAIL PROTECTED] http://www.liacs.nl/~wichert/ | > | 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D | >