Boost logo

Boost-Build :

From: Steven T. Hatton (hattons_at_[hidden])
Date: 2004-10-23 15:19:14

On Saturday 23 October 2004 07:40, Vladimir Prus wrote:
> Steven T. Hatton wrote:
> > How do I get bjam to produce the following (or equivalent) invocation?:
> >
> > g++ -ovmosg -I/code/root  -L/opt/org/osg/lib -losg -losgProducer
> >
> > The -l flags translate into files named similar to this:
> >
> >  -losgProducer ==>
> >
> > I get the -I/<path>/<to>/<include> by using expressions such as this:
> > `<include>$(OSG)/include' in the requirements block.  Likewise for the
> > -L flags.  What I haven't been able to produce are the -l flags.
> Declare the lib with
>   lib osg ;
> and then use it in your exe. This is documented in more detail at:

Unfortunately (or fortunately) I didn't explain my situation well. I had been
using Boost.Build v1. I did figure out how to get it to compile by being
very explicit with the name of the library file. I believe the directive I
used was `<library-file>' I decided to try using the latest CVS of bjam, and
after a bit of struggle, I got it working like this:

project vmosg ;
lib osg : : <name>osg ;
lib osgProducer : : <name>osgProducer ;

exe vmosg : osg osgProducer
: <include>$(OSG)/include

One thing that was throwing me off was a rather lengthy warning indicating the
project-root function had been passed a null argument. It was displayed in
red in Emacs, which is the color errors (warnings are usually orange) are
typically displayed in.

I consolidated my Jamfile and project-root.jam, and everything worked.


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