Hi Sven,

On Sun, Nov 22, 2020 at 11:44:42AM +0100, Sven Joachim wrote:
> On 2020-11-22 11:29 +0200, Wouter Verhelst wrote:
> > What am I missing?
> 
> I think this happens because g++ passes --as-needed to the linker in
> unstable, but not in stable.  Your test program is compiled with
> 
> g++ -o linktest $(pkg-config --cflags --libs libola) debian/tests/hw.cc
> 
> and that adds -lola at the wrong place in the commandline.  According to
> the binutils documentation, --as-needed has this effect:
> 
> ,----
> | Object files or libraries appearing on the command line _after_ the
> | library in question do not affect whether the library is seen as needed.
> | This is similar to the rules for extraction of object files from
> | archives.  '--no-as-needed' restores the default behaviour.
> `----
> 
> So,
> 
> g++ -o linktest debian/tests/hw.cc $(pkg-config --cflags --libs libola)
> 
> is probably you want instead.

I was going to say "but 913704", but somehow I lost that change... D'oh.
That would explain it, obviously.

Thanks!

-- 
To the thief who stole my anti-depressants: I hope you're happy

  -- seen somewhere on the Internet on a photo of a billboard

Reply via email to