Edan Maor Edan Maor - 2 months ago 28
C++ Question

Using Boost on Windows (Visual Studio)

I want to get started using Boost. I'm programming a C++ program in Visual Studio (obviously on a Windows machine).

Boost's Getting Started Guide says:

The easiest way to get a copy of Boost is to use an installer. The Boost website version of this Getting Started guide will have undated information on installers as they become available, or see Boost downloads or the installer provided by BoostPro Computing. We especially recommend using an installer if you use Microsoft Visual Studio, because the installer can download and install precompiled library binaries, saving you the trouble of building them yourself.

I'm a little unsure if I want to follow this advice, or just download and build everything myself. Potential problems that I see with an installer are:

  1. Things are no longer self-contained (i.e. every team member has to install Boost, then configure Visual Studio to recognize it).

  2. I can't keep Boost under source control (I would ideally like it to be soure files in my source control like everything else). (Edit: Judging by the comments, it looks like boost is kinda large (as in 5 GB!), so obviously I'd need to keep only parts of it under source control).

So my question is, am I just being paranoid and should go the installer route, or am I correct and should build it myself? If anyone has any experience working with Boost and Visual Studio, I'd appreciate if they could share their views on this (and if it should be to build it myself, any tips would also be appreciated, for example should I only copy every file that I actually use? etc.).


A few similar questions on StackOverflow, but which didn't ask this explicitly, make me think that I shouldn't use the installer, which is why I'm asking it explicitly here. For reference, these are the questions:

  1. Boost linking, Visual Studio & version control

  2. Including Relevant Boost Libraries with C++ Source (Using Visual Studio)


A good way to make sure everyone has everything configured properly is to use svn externals. You can create something like /trunk/boost1.35 and then you can point to that with an svn external.

That way as new versions of boost come out, you can just repoint your svn external to /trunk/boost1.40

In your repository, your svn external points to that svn folder within your repository. Example /depends/boost

We personally keep the boost header files under source control as described but keep the libs as a zip that we require everyone to download. We have an environment variable something like the following BOOST_LIB and we point that to the current boost library directory.