From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2005-05-25 06:13:38
On 5/25/05, Paul A Bristow <pbristow_at_[hidden]> wrote:
> Recently we had a flurry of discussion of why Boost is not more widely used.
> I have used some bits of Boost happily for years, but recently I felt I had
> to use it 'properly' so concluded it was time I used the bjam build system -
> something I had felt looked a bit clever.
> Indeed my suspicion was proved correct - I couldn't get it to work. The
> instructions are far too Unix/Make oriented for this mere Windows hacker;
> the Wiki Windows specific instructions are much better but suggest copying
> (duplicating) a lot of files to avoid an addition to the include
> directories, and don't apply to the most recent compilers.
> Victor Wagner gave some hints recently using environment variables, but not
> the full text.
> I don't doubt the usefulness of the bjam to the congescenti - only with this
> could the incredibly impressive build & test system allow all the cracks and
> chasms of compiler non-compliance and language imprecision to be papered
> over - Boost's great strength.
> But if we are to interest your average Windows IDE programmer, for whom MAKE
> is a blank or a distant nightmare, IMO we need some much better and simpler
> instructions, including lots of examples of input and output, and to be as
> well tested as the rest of Boost code. Like it or not, these are the
> potential customers and I spoken to many who are put off by the 'build
> I suggest that we explicitly say that you can use all of Boost (except the
> ones that must have built libraries) by adding to the include list - and say
> exactly how in Windows IDE-ese.
> If you share my concern, would some someone like to prepare something?
> Or at least provide details of their way of doing it.
> I will be willing to help with checking/editing.
> Paul A Bristow
> Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
> +44 1539 561830 +44 7714 330204
> mailto: pbristow_at_[hidden]
Paul - I use VS2003 and VS6 (for legacy projects). This is the process
I tend to follow when setting up a new machine (I've done several of
them, both for myself and other people recently, so I'm reasonably
1. Download and unpack Boost!
2. Open up a Visual Studio 2003 command prompt window (this is on the
Start Menu entry for Visual Studio 2003, and has pre-run vcvars32.bat)
and 'cd' to the root Boost directory. Execute the command
bjam -sTOOLS=vc-7_1 --prefix=c:\lib\boost
I don't have Python installed, so I just ignore the Boost.Python error
message when it can't find a Python installation.
3. Open up a second command prompt window and run the vcvars32.bat for
Visual Studio 6. Then execute this command
bjam -sTOOLS=msvc --prefix=c:\lib\boost
When I use Visual Studio, I use environment variables to point at the
libraries I use (not just Boost - libxml, libxslt, wtl as well) and
insert these environment variables into the 'Additional Include
Directories' and 'Additional Library Path' options in the VS project
settings dialogs. For example, I might define these environment
and insert '$(BOOST_INC_ROOT)' into the 'Additional Include
Directories' setting and '$(BOOST_LIB_ROOT)' into the 'Additional
Library Path' setting.
One extra detail that I find eases things is that I use Joshua Jensens
Solution Build Environment add-in
to define these environment variables (for VS2003 - I wrote an
equivalent add-in for VS6). This means I can vary the environment
variable settings on a project-by-project basis, as the environment is
defined by a file thats part of hte project. This helps for legacy
projects (I've got up to 5 versions of Boost available, depending on
the machine I'm at) and also where the install location varies.
One final point - whoever came up with the autolinking scheme (think
it was John Maddock?) - thank you very much - that makes life *so*
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk