]] Cristian Ionescu-Idbohrn
> Sorry, that's too dense for me ;)
> If /usr/lib/i386-linux-gnu/pkgconfig/libdivecomputer.pc lists:
>
> libdir=${prefix}/lib/i386-linux-gnu
>
> and that's exactly where the a-lib _and_ so-lib are, why should I see a
> SPACE string result? `man 1 pkg-config':
arguably, it should be an empty string, not a space.
> --libs-only-L
> This prints the -L/-R part of "--libs". That is, it defines
> the library search path but doesn't specify which
> libraries to link with.
>
> Why shouldn't that work as advertised? Looks like a bug, if you ask me.
Because adding -L/usr/lib in the middle of a linker line might cause gcc
to end up grabbing the wrong library if you have both a
/usr/lib/libfoo.so and a /usr/somewhere/else/libfoo.so and you want to
use the latter.
> > > libdc-usr := $$(pkg-config --libs-only-L
> > > libdivecomputer)/libdivecomputer.a
> >
> > I dislike static linking, but doing
> >
> > libdc-usr := $$(pkg-config --variable=libdir
> > libdivecomputer)/libdivecomputer.a
> >
> > should give you what you expect.
>
> So that should work for dynamic libraries too. Testing...
> And it does ;) So the answer is:
>
> libdc-usr := $$(pkg-config --variable=libdir
> libdivecomputer)/libdivecomputer.so
Don't do this. Just do -ldivecomputer and let the compiler do its
work (or use pkg-config --libs libdivecomputer).
--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]