Friday, April 11, 2008

Building Boost 1.35

I'm a big fan of the boost library for C++ development.  They're incredibly well designed and implemented, generally cross-platform, and quite well documented.  In short, they're awesome.

However, I regularly have issues building them (on Windows with the VS2005 compiler).  Thankfully I'm not alone.  Kevin Heifner ran into the same problems I did when trying to build the recently released 1.35 and documented a work-around.  Thanks Kevin!  It worked a treat.

The summary is that the Boost Consulting group, who usually put together a nice installer, haven't yet published one for 1.35.  Further, following the instructions on the Getting Started page that describe how to build boost led me astray.  With hindsight I think the major problem was that the "stage" directory mentioned in the example needs to be created before the build commences.  Anyway, Kevin provides an alternative set of command line options for bjam:

cd "C:\Program Files\boost\boost_1_35_0"

bjam --toolset=msvc --build-type=complete --prefix="c:\program files\boost\boost_1_35_0" install

Then just configure your projects Additional Library Directories to include "C:\Program Files\boost\boost_1_35_0\lib".


Anonymous said...

Thanks a bunch! I ran into problems trying to build boost 1.35 as well, namely that bjam didn't build all of the required libaries. I think the boost people need to get their getting-started guide up to snuff. It seems to be obsolete.

Anonymous said...

Works for boost 1.36.0 too. Boost docs are still out of date.