From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-02-19 14:00:51
On Friday 09 February 2007 05:04, Vadim Mikhailov wrote:
> Hi, fellow boost builders!
> I using bjam v. 3.1.13 NT, boost.build v. 2.0-m11, msvc-8.0 sp1.
> I need to do something like this and can't seem to figure out how:
> lib library : library.cpp debug.cpp ;
> exe program : program.cpp debug.cpp library ;
> In other words, I have DLL called "library" which exports few
> functions, but also compiles in some service module (debug.cpp in this
> case). Another "program" needs to use functions exported by "library",
> but also needs to compile in copy of its own debug.cpp.
> (making debug.cpp to export its functions via library.DLL is not
> acceptable for many reasons). Unfortunately, this always gives me
> duplicate target errors - when I try to build it using bjam, I get this:
I've added this case as comment to:
Unfortunately, fixing that issue might take some time.
As a workaround, you can use this:
local common-sources = debug.cpp ;
local common-objects ;
for local s in $(common-sources)
common-objects += [ obj $(s:S=.o) : $(s) ] ;
exe program : $(common-objects) ........ ;
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