Re: pkg-config question



> Thomas Vander Stichele <thomas apestaart org> writes: 
> > -L /home/thomas/cvs/lib -lgstreamer -L/home/thomas/garnome/lib -lglib-2.0 
> > -lxml2 ...
> >
> 
> I think I used to not rearrange, intending to get the effect you
> mention, but it turns out that the order of these flags doesn't
> matter. From the "ld" info page, note the last sentence:
> 
>  `-LSEARCHDIR'
>  `--library-path=SEARCHDIR'
>      Add path SEARCHDIR to the list of paths that `ld' will search for
>      archive libraries and `ld' control scripts.  You may use this
>      option any number of times.  The directories are searched in the
>      order in which they are specified on the command line.
>      Directories specified on the command line are searched before the
>      default directories.  All `-L' options apply to all `-l' options,
>      regardless of the order in which the options appear.

Hm, that's HUGELY annoying ;) Is there any way I can work around this, 
using whatever means (maybe even splitting up libs) ? Any idea why this 
behaviour would be better than what one would expect ?
Would it make sense to somehow make it possible to influence the order of 
-L flags (since it would seem from the description that it searches the 
dirs in the order they are specified) ?
Is this what .la files could solve better ?

> So if I understand your question correctly, the answer is "what
> pkg-config does will not make any difference."

Yeah.  Damn.  Out of curiosity, if it used to not rearrange them, and ld 
doesn't care either way, why was code added to sort out the -l and -L 
flags ?

Thomas

 -- 

The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*-                      -*->
Lover fair
We'll be looking sharp I swear
I want them all to stop and stare
When we take'em down
<-*- thomas apestaart org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/




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