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

Re: -L not working properly?



"Daniel Jacobowitz" <dan@debian.org> writes:

> > > So am I delusional, and -L never worked in 'last seen, first used'
> > > order? I thought the whole point was to be able to do things like:
> > > 
> > >   -L/priv/lib1 -llib1 -L/priv/lib2 -lib2 -L/priv/lib2 -lib3 ...
> > > 
> > > and ensure you were getting the correct libraries?
> > 
> > Please RTFM. :) One of the next sentences I omitted is: 'All -L
> > options apply to all -l options, regardless of the order in which
> > the options appear.'

I understand that they all apply, that isn't the issue. The issue is
what is the search order of the -L directories:

1) first in first out (queue)
2) last in first out  (stack)

My understanding (which seems to be flawed) was that it was 2) and not
1). The way makefiles are constructed, you have little control about
what comes first on the link line, but you can easily add: 

  -L/my/private/lib -lmylib

to ensure that the private lib gets searched first. 

What is happening to me is that the search order seems to be happening
the opposite of the way I believed it to have always been working.

> > > I'm downloading code off standard repositories that is suddenly not
> > > linking because of this - did it change recently??
> > 
> > No idea, I wouldn't expect it it did though.
> 
> No, this has not changed in some time.

So has the search order been 'first in first out' all along? I can't
find this documented anywhere, it seems like an important thing to
know.

Thanks,
jas.


-- 
To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: