tags:

views:

416

answers:

2

Here's a question you may have seen around the 'nets in various forms...summed up here for you googling pleasure :-)

I have a project that is built with Microsoft's Visual Studio and uses functionality from boost (http://www.boost.org/). I already have my project working with some of the libraries that are header only (no binary library needed to link with). How or where can I get the windows binaries for the other libraries?

+1  A: 

Build them yourself. Download a bjam executable from the boost website, then execute the following command from the boost src root directory:

bjam --toolset=msvc --build-type=complete define=_BIND_TO_CURRENT_MFC_VERSION=1 define=_BIND_TO_CURRENT_CRT_VERSION=1 stage

Then go get some coffee or leave it running over night. After that you get results in the 'stage' folder. Add this directory to your 'library files' in options->projects and solutions->VC++ directories.

Roel
To clarify, the _BIND_TO_CURRENT_MFC_VERSION is to prevent issues when deploying later; see my answers to another question at http://stackoverflow.com/questions/59635/app-does-not-run-with-vs-2008-sp1-dlls-previous-version-works-with-rtm-versions/70808#70808 .
Roel
+4  A: 

There are three different options for accessing the binary libraries:

1) Build them from source.
Go into the boost directory and run:

    bootstrap
    .\bjam

Or get more complicate and do something like:

    bjam --stagedir="c:\Program Files\Boost" --build-type=complete --toolset=msvc-9.0 --with-regex --with-date_time --with-thread --with-signals --with-system --with-filesystem --with-program_options stage

2) Use the BoostPro installer (http://www.boostpro.com/download) to get the specific libraries that you need.
This is very nice because it only downloads and installs the files that you say you want. However, it never has the most current version available, and there are no 64 bit binaries.

3) Download the entire set of libraries (http://boost.teeks99.com)
Easy to use, simple to do, but the libraries are huge (7GB unzipped!).

teeks99
Why do you ask a question, then provide a 3-point answer to your own question 5 minutes later? Are you just farming rep by asking simple questions then answering them yourself?
Roel
I'd seen a bunch of people ask this question in different forms, sometimes not knowing how to ask. I just wanted to get it out there in a clear manner so anyone could find it.
teeks99
I don't see anything wrong with what you are doing. Though maybe you should explicitly say that this is an amalgamation of other questions so people can decide on their own if they want to vote you up for your editing effort.
A. Levy
Yeah, I added a comment towards that end in the original question. Also, on the meta site, I found the question about this etiquette: http://meta.stackoverflow.com/questions/12513/stackoverflow-should-i-answer-my-own-question-or-not/12519#12519
teeks99
I remember doing like (1) (building myself) and I ended up using a very large amount of disk space. I guess the disk space of (3) is similar to the one of (1) if you build everything.
Wernight