|
Boost-Build : |
Subject: Re: [Boost-build] Difficulty with pre-built lib declaration
From: Ian Emmons (iemmons_at_[hidden])
Date: 2008-12-19 15:54:17
Volodya, thanks for the quick response. Switching to searched-lib
definitely helps, but it doesn't completely solve the problem. It
appears that this change allows bjam to get the library name correct,
but the <search> feature isn't being processed correctly. In
particular, bjam issues the linker command with the correct library
name, but it doesn't add the <search> value to the /LIBPATH option
(which is entirely missing), and so the compiler complains that it
can't find the library:
LINK : fatal error LNK1181: cannot open input file 'libdb47d.lib'
BTW, I am explicitly specifying the <toolset>, <address-model>, and
<variant> features on the bjam command line:
bjam toolset=msvc-8.0 address-model=32 variant=debug
If I change the searched-lib declaration so that the <name> is
conditional, but the <search> is not, like so:
path-constant BdbDir : D:/dev/KB/lib/bdb ;
constant BdbVersion : 47 ;
searched-lib BerkeleyDB
: # no sources
: <search>"$(BdbDir)/lib/Win32-vs2005"
<variant>debug:<name>libdb$(BdbVersion)d
<variant>release:<name>libdb$(BdbVersion)
: # no default build
: <include>"$(BdbDir)/include"
;
then the link does work (as long as I choose the correct path for the
<search> value).
Any further suggestions?
Thanks,
Ian
On Dec 19, 2008, at 3:22 PM, Vladimir Prus wrote:
On Friday 19 December 2008 23:00:02 Ian Emmons wrote:
> I would like to
> define the library target this way:
>
> path-constant BdbDir : D:/dev/KB/lib/bdb ;
> constant BdbVersion : 47 ;
> lib BerkeleyDB
> : # no sources
> : <variant>debug:<name>libdb$(BdbVersion)d
...
> However, this definition causes bjam to output the following error:
>
> D:/bin/boost-build/kernel\class.jam:93: in new
> *** argument error
> * rule object(searched-lib-target)@196.__init__ ( name : project :
> shared ? : search * : action )
> * called with: ( BerkeleyDB libdb47d : object(project-target)@10 :
Hi Ian,
can you please use 'searched-lib' target type, not 'lib'? It appears
that use of <name> inside conditional requirements confuses 'lib'.
- 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