Mateusz Loskot :: hacking on, working out, living up

Building Boost with Visual Studio 11 Developer Preview

06 Nov 2011 | mloskot

Yesterday, I installed Visual Studio 11 Developer Preview. The new release is available for free and is usable for free until June 2012, so it’s a great opportunity to try and learn what Microsoft has to offer for C++ programmers. And, it looks it offers a lot, including SCARY features.

The first test I usually do when it comes to test a new C++ toolset is to build Boost C++ Libraries using mainstream development sources.

The Boost simply builds well. I have even configured build of Boost.Python using Python version 3.2.

There are no hacks required to make the build happen. Simply, follow Boost Getting Started on Windows, section 5.3. Or, Build Binaries From Source. Once the Boost.Build tools bootstrapped, I issued the following command:

b2 --toolset=msvc variant=debug runtime-link=shared threading=multi define=_CRT_NONSTDC_NO_DEPRECATE define=_CRT_SECURE_NO_DEPRECATE define=_SCL_SECURE_NO_DEPRECATE stage

Fifteen minutes later, the Boost build was ready and staged.

By the way, some time ago Christian Henning posted a quick cheat sheet of bjam commands for Visual Studio. It’s very handy.

Fork me on GitHub