Boost logo

Boost-Build :

From: Nigel Miller (nigelm_at_[hidden])
Date: 2006-09-14 11:20:45

Nigel Miller writes:
> I have another question already. Can BBv2 handle cross-linked DLLs?
<snip - rest of previous post at the end for convienience>

I'm assuming that given there were no more mails on this that what I'm asking
isn't trivial :(

On unix the libraries don't reference each other and instead the main
executeable links against them all. In fact the product was orginially Unix
only which is how we got into this situation in the first place. But with 20-
30 libraries like this pulling them appart is long term task.

One way I was thinking to handle this for windows (whilst keeping it as
similar as possible to Windows) would be to make shared libraries on Unix
build as normal, but on windows make it just build the import library (i.e.
lib). Then create a new DLL building rule that actually links the DLLs.

Exe's then rely on what ever the lib rule builds (on windows the import lib
and on Unix the shared lib) - and then perhaps make the exe's on windows also
depend on the DLLs so they do still get built even if they are not used on the
actual link line.

Does anyone have a feel for how easy this would be to implement within BBv2?


Nigel Miller writes:
> I have another question already. Can BBv2 handle cross-linked DLLs?
> By this I mean 2 DLLs that use symbols from each other. In our current build
> system we have to compile all the libraries and generate the import
> (.lib) and then link the DLLs pulling in the .libs each one needs.
> At a trivial level the following Jamroot shows the problem
> lib liba : a.cpp libb ;
> lib libb : b.cpp liba ;
> (here a.cpp and b.cpp can be empty files) and this produces the following.
> C:/boost-build/build\targets.jam:537: in start-building from module targets
> error: Recursion in main target references
> error: the following target are being built currently:
> error: ./liba ./libb ./liba
> etc...
> Is there a way to make BBv2 do the .libs then the .dlls?

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at