
Boris Schaeling wrote:
On Tue, 28 Jul 2009 13:00:11 +0200, Vladimir Prus <vladimir@codesourcery.com> wrote:
[...]
I have another question: What exactly does <find-shared-library> do? Does it automatically define and use a lib target like:
lib xy : : <name>xy <link>shared ;
It's the other way around, actually. <find-shared-library> instructs to link against named library, so
<find-shared-library>x
results in
-lx
on linux (and x.lib on windows). 'shared' means to make sure it's actually shared.
If I need to set a path to x on a platform because I know <find-shared-library> won't be able to find x automatically can I add a "lib x" rule to a configuration file as a fallback mechanism? Then I could use <search> to help <find-shared-library> to find x?
You can, but it's somewhat non-direct. The <library-path> is the low-level feature. That is, if you define lib xy : : <name>xy <link>shared <search>foo ; the targets that use xy will get additional <find-shared-library>xy <library-path>foo properties. There are little reasons to directly use the latter features these days, to be honest. - Volodya