Boost logo

Boost-Build :

From: Jared Riley (jkriley_at_[hidden])
Date: 2008-03-27 22:15:02


I'm attempting to convert a project from Make to Boost.Build (2.0-m12).
  The output of the project is a shared library.

The directory structure of the project is something like this:

--> sub1
| |
| --> sub11
| | |
| | --> a.cpp
| | --> b.cpp
| |
| --> sub12
| |
| --> c.cpp
| --> d.cpp
--> sub2

Currently, the makefile creates a directory top/build, and compiles
*.cpp into that directory. Then it links top/build/*.o into and
it's done.

Now, what I tried to do with Boost.Build, and I can't get to work the
way I want is the following:
lib sub11 : [ glob *.cpp ] : <link>static ;

lib sub1 : sub11 sub12 : <link>static ;

lib top : sub1 sub2 : <link>shared ;

What I was trying to do was to have a static library for each sub
directory. The top directory would combine every library below it and
become a shared library.

If I try to do this, it works fine as long as I leave it with
<link>shared in every Jamfile. The problem then is I get about 40
  shared libraries that aren't usable by other things.

If I change it to <link>static as shown above, I get "warn: Unable to
construct ./sub1" and nothing gets built.

Thanks in advance for any help,

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