Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-10-17 12:53:43


On Tuesday 17 October 2006 19:44, John Maddock wrote:

> I started producing a Jamfile to test bbv2's lib naming (attached: lives in
> libs/config/test/link/test).
>
> It works with VC++, but with Intel and Borland the linker complains that it
> can't find the auto-linked lib. To fix that we would need the path to the
> library specified on the link command line with -Lpath-to-lib-file.
>
> Do you know of a way to extract the path to the lib target to make this
> work?

John,
I've sent you an email about this recently, did you miss it?

I attach that email just in case.

- Volodya


attached mail follows:


On Sunday 24 September 2006 12:52, John Maddock wrote:
> Vladimir Prus wrote:
> > The question is we we want to add -L options just when testing
> > auto-linking, or always? I don't like the idea of always adding it,
> > since that would be a bit pointless with V2 -- you have absolute path
> > to the library already, so the only thing autolinking can do is to
> > link to the same library.
> >
> > In other words, autolinking is very helpful when you link to
> > installed Boost using some existing build system of yours, and we
> > need to test that it works, but when using Boost.Build, autolinking
> > is not necessary.
> >
> > So, I think we need an extra feature that specifies if -L options
> > derived from full paths of all used libraries should be added, and
> > use that feature when testing auto-linking code.
> >
> > Does this sound reasonable?
>
> As long as there is some way to set things up so that everything is
> routinely tested I'm happy. So yes, some kind of magic in the Jamfile that
> adds the needed -L options to the exe targets would be fine.

Hi John,
sorry it took me a bit of time to get back to you about it.

Please take a look at attached project. When I run it with "bjam -n", the link
line for the executable includes the -L command line option for the library.
(I did not add any content for the files, so running without "-n" is not going
to do anything interesting)

You should be able to adjust your test Jamfile using that code -- just make
sure you use "autolink-lib" instead of "lib" everywhere.

Please let me know whether this works for you.

Thanks,
Volodya




Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk