Boost logo

Boost-Build :

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


Hi,

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:

top
|
--> 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 top.so 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:
--------
top/sub1/sub11/Jamfile:
lib sub11 : [ glob *.cpp ] : <link>static ;

top/sub1/Jamfile:
lib sub1 : sub11 sub12 : <link>static ;

top/Jamfile
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,
Jared


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