|
From: | Bob Friesenhahn |
Subject: | Re: Linking against indirect dependencies |
Date: | Mon, 24 May 2004 19:32:01 -0500 (CDT) |
On Mon, 24 May 2004, Albert Chin wrote:
On Mon, May 24, 2004 at 08:19:00AM +0200, Szombathelyi Gy?rgy wrote:I've just curious if is it possible _not_ to link a program/lib against its indirect dependencies. I mean if libC is linked against libB and libB is against libA then libtool will link libC against libA, which is not neccessary in most situations (at least not on Linux, but I guess not in most ELF platforms). What I've discovered is that libtool always links against all the depencency_libs in the .la file. Here's a thread about this issue in KDE: http://lists.kde.org/?l=kde-core-devel&m=108534182408921&w=2dependency_libs doesn't contain just libraries. Maybe LDFLAGS as well, like -pthread. BTW, is it _really_ a problem to link against everything in dependency_libs? Indirectly, this is going to happen anyway even if libtool doesn't do this.
Of course the correct answer is that not linking against indirect dependencies is non-portable. Certainly Microsoft Windows DLLs require full linkage, and I believe/suspect that AIX does as well.
Libtool always chooses the most portable approach and does not encourage developers to use non-portable platform-specific approaches. If libtool encouraged developers to use non-portable platform-specific techniques, then it would be dealing a blow to the goal of supporting portable software.
Bob ====================================== Bob Friesenhahn address@hidden http://www.simplesystems.org/users/bfriesen
[Prev in Thread] | Current Thread | [Next in Thread] |