[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Library dependencies
From: |
Nicola Pero |
Subject: |
Re: Library dependencies |
Date: |
Thu, 15 Mar 2001 11:10:47 +0000 (GMT) |
On Wed, 14 Mar 2001, Jonathan Gapen wrote:
> With a little bit of manual intervention, I found I can create
> GNUstep executables without the numerous of library dependencies. It's
> not hard: When linking the GNUstep library, pass the normal linker
> arguments for all of the libraries which it depends upon. Then, when
> linking the executable, DO NOT give any of those linker arguments. For
> a command-line tool, "-lgnustep-base -lobjc" (and perhaps the thread
> library argument) is enough. This generates an executable that only
> explicitly depends on libgnustep-base.so, libobjc.so, and libc.so,
> insulating it from any differences in the library set used by the
> GNUstep libraries.
I generally like this idea - seems a simplification of interdependencies.
But there is a little point we probably need to think about before doing
any change of this kind - some exceptional gnustep applications could need
to access the support libraries directly. For example, exceptional
gnustep applications could need to use gnustep-gui and still in
exceptional cases access X directly. For all of this to work, the X
library used by gnustep-gui and the X library used by the application need
to be the same. The same applies, say, to libxml. If you build an
application which both links with gnustep-base and uses libxml directly,
then you must use and link with the same libxml that is used in
gnustep-base. This can only work easily if gnustep automatically passes
-I, -L, -l flags for all support libraries when compiling/linking - that
is, the old arrangement. How can we make a rearrangement which is
flexible enough to meet both needs ?