Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-02-13 07:04:31

Vladimir Prus wrote:
>Hi Reece,
> > There has been some discussion about using pre-built libraries with
> > Boost.Build and was wondering if it would be possible to implement an
> > "import" feature that imports libraries from one or more directories,
> > declaring them as targets.
> >
> > [snip]
>I actually keep on wondering if we went to far with prebuilt targets. Why
>don't we allow
> exe main : main.cpp /usr/lib/somelibrary.a
> : <find-library>z <library-path>/opt ;
>to work?

This would be useful. Also, it would be helpful to specify the search
directories, so you can do:

exe myapp : main.cpp user32.lib atl.lib ... urlmon.lib

without specifying the absolute path all the time. This would also allow you
to change the location of the libraries when upgrading or switching to a
different compiler (e.g. using the Windows SDK on Borland or GCC).

>I fact, only <find-library> does not work at the moment. If a person
>wants additional flexibility, he can rewrite it as:
> alias some : /usr/lib/somelibrary.a ;
> lib z : : <name>z <search>/opt ;
> exe main : main.cpp some z ;
>This would lift the need to declare all windows SDK libraries -- and would
>complicate the system at all.

My idea was to simplify this approach. Using the above example, I would

# psdk.jam
alias user32 : $(psdk.root)/lib/user32.lib
alias atl : $(psdk.root)/lib/atl.lib
alias urlmon : $(psdk.root)/lib/urlmon.lib

# JamFile
exe myapp : main.cpp user32 atl ... urlmon

>What do you think?

I think your idea would be the best approach *if* you can get search
directories working (ideally configurable for different toolsets, e.g. gcc,
borland, metrowerks, etc.). That way, it will behave in a manor similar to
my approach, but without the need to add an alias/lib for each available


Tired of 56k? Get a FREE BT Broadband connection


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