Re: [xml] Generating a correct xml2-config for use with --libs



In message <3D089E60 2040700 sun com>
          Gary Pennington <Gary Pennington sun com> wrote:

Stefan Kost wrote:

Hi Gary,

but libxml2 does networking (see nanoftp and the likes).

Stefan

I know, which is why libxml2 links with the appropriate libraries
(-lsocket etc). However, that doesn't mean that any application which
links with libxml2 must also link with the networking libraries.

In the first place, if you link a library (xml) against another library
(sockets) then you have added a chunk to that former library which is
unnecessary duplication.

In the second place, some linkers complain if you attempt to link a library
which contains symbols already provided in another library - ie linking your
program that uses sockets against a libxml linked with sockets will have two
sets of symbols for the things in sockets. This produces problems for some
linkers who will refuse to link such things because it cannot be certain that
the symbols in both the files are identical, and in any case it causes
greater problems when the core library (sockets) is updated as libraries
which have been linked against it must be relinked (regardless of whether
you're keeping binary compatibility).

This issue is very similar to that of assuming that the linker will 'know'
what to do with duplicated symbols as was the case with the original
versions of xsldebug.

-- 
Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
URL: http://www.movspclr.co.uk/
... Eyes to the heavens, screaming at the sky;
    Trying to send you messages, but choking on goodbye.



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