Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-02-05 05:29:40


Hi Reece,

> I have a few more questions regarding using Boost.Build V2:
>
> [1] (I'm pretty sure this is a GCC setup problem): Compiling/Linking a
> simple Hello world app, I get

> /cygdrive/d/devel/ADL++/code/hello/..\..\code\hello\hello.cpp:6: undefined
> refer
> ence to `ostream::operator<<(char const *)'

> I have GCC 2.95.3-5 installed at root (d:/devel/cygwin) and it worked fine
> until I build and installed GCC 3.0 (to /usr/local). I'm pretty sure this
> is to do with the version of libstdc++.a being linked -- which is why I
> wanted to link $gcc-dir/lib/libstdc++.a (this solved the problem before.
> Does anyone know whats wrong?

Nope. I'm just installing cygwin for the first time (actually, for the second,
since first try did not work out), so don't have any experience with it yet.

> [2] How do I link external libraries (e.g. urlmon.lib) to an executable?

I think

http://boost.sourceforge.net/boost-build2/boost_build_v2.html#prebuilt_targets

explains this. You can also add library to the list of sources, it library is
in the current directory or you know absolute path.

exe a : a.cpp urlmon.lib ;

> [3] Is it possible to perform specific actions on a target? E.g. move an
> exe to a specific directory once built?

exe a : a.cpp ;
stage dist : a ;

> Or run a target?

unit-test a : a.cpp ;

> Or specify an
> action set, e.g.:
>
> action-set finalize :
> <action>move
> <action>run
> ;
>
> exe hello : hello.cpp
>
> <bind-action>finalize
> ;

Nope, no generic way to run post-processing command exists. This is probably
related to

http://zigzag.cs.msu.su:7814/scarab/issues/id/BB51

which asks for a way to just invoke a command from Boost.Build

exe hello : hello.cpp ;
notfile done : echo "build complete" : hello ;

But probably you have something else in mind...

- Volodya

 


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