From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-04-24 09:36:03
On Friday 21 April 2006 03:20, Emil Dotchevski wrote:
> I read the documentation, and it says that to define a header-only lib, I
> just list the headers as sources so that boost-build knows which files to
> track for changes. That works fine, except that when an executable refers
> to the header-only lib, I get a link error because it is attempting to link
> a lib file which does not exist.
Where does it say so? Typically, header-only library is defined using
: # no sources
: # no requirements
: # no default build
> I understand that if I refer to the lib only through <use> and not through
> <library>, I won't get link errors. But that is not ideal -- what if I add
> a cpp file to the lib at a later time? Ideally, I'd like to setup my
> jamfiles so that if I add a cpp later, I don't have to go through and edit
> all jamfiles that use the lib.
> Is there a way to achieve this?
Use alias, as above. When you add cpp file to lib, change "alias" to "lib".
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
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