[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: building Lua in Ubuntu-12.04
- From: Enrico Tassi <gares@...>
- Date: Thu, 27 Dec 2012 09:40:51 +0100
On Wed, Dec 26, 2012 at 06:05:55PM -0600, Drake Wilson wrote:
> This makes more sense in a shared-library environment, since it means
> that if a later compatible version of readline does not use ncurses,
> existing applications will not needlessly depend on it and load it
> themselves. However, it is inconsistent with the static library case,
> where linking an application requires specifying the entire dependency
> order manually. This is kind of unfortunate, but in the static case
> there aren't the subtle runtime quasi-bugs that can occur from
You are right, thanks for this nice explanation I had no energy to write!
Anyway these days you should not poke with -l flags by hand.
For example pkg-config offers the possibility to specify which libraries
are "private" to your library, and spits out -l flags for them only in
the static linking case:
Libs.private:
This line should list any private libraries in use. Private
libraries are libraries which are not exposed through your
library, but are needed in the case of static linking.
Unfortunately the readline package ships no .pc file :-/, otherwise the
civilized way of populating LDFLAGS would be by calling
`pkg-config --libs readline` or `pkg-config --libs --static readline`.
Anyway (today?) readline does not depend on ncurses, thus the two
invocations would output the same set of flags.
Cheers
--
Enrico Tassi