On Sun, 2003-09-07 at 15:46, Andrew M Hoerter wrote:
>
> On Sun, 7 Sep 2003, Paul M Foster wrote:
>
> > Well, that's bizarre. Actually it works fine without the first -lfl but
> > with the last one. I've heard of having to call libraries in a certain
> > order, but I never grasped why. I see this is a case of it. Thanks.
>
> The reason is that UNIX linkers are dumb. They scan libraries and object
> files in the exact order specified and don't make multiple passes to
> collect all the required symbols.
>
> To avoid this problem most people link in a particular order such as:
>
> myobj.o bla.o foo.o -lapplibrary -lapplibrary2 -lsyslibrary -lsyslibrary2
>
> By ordering objects from "highest level" to "lowest level" dependencies
> will tend to be satisfied properly. Just wait until you have a circular
> dependency at link time, that's when things get really "fun".
Aaauhg! This is some "fun" I too have suffered through when I was
writing drivers for frame grabbing. Ugh.
The Logan
-- 2.4.22 20:30:01 up 10 days, 7:39, 1 user, load average: 0.15, 0.34, 0.66 When you look up redundant in the dictionary it says, "see redundant". -- Matt Miller, SLUG List Registered Linux User 277727 GAIM ICQ 72101412
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:23:08 EDT