views:

183

answers:

2

Could someone tell me a command line switch for bjam or something else that will make boost compile with VS2010 using the new Windows Platform SDK 7.1 toolchain? It's an option you can set in a normal visual studio project. The default is v100 a variant of the platform 7.0 toolchain. Thanks in advance.

+1  A: 

To build boost 1.43.0 libraries for VS 2010:

  • Download and extract to C:\Temp\boost_1_43_0
  • Start Visual Studio 2010 Command Prompt
  • Build BJam

cd C:\Temp\boost_1_43_0\tools\jam\src

build.bat

cd C:\Temp\boost_1_43_0

tools\jam\src\bin.ntx86\bjam.exe --with-regex link=static runtime-link=static threading=multi variant=debug,release address-model=32,64

May need to build in two phases with just address-model=32 then with just address-model=64. In this case we are choosing to build libs that statically link to the C runtime and to statically link to the boost lib itself.

Use --with to build non-header based libs like regex. Note stage/lib will be overwritten after each address-model build, but all libs are always kept in bin.v2.

Sean Fausett
Just noticed boost 1.44 is out. I specified boost 1.43 because that's what I built using the above not too long ago.
Sean Fausett
Thanks for the general info on boost and Visual Studio but that is not quite what I was asking. I was asking specifically how to make bjam use Windows Platform SDK 7.1 toolchain as the default is v100 a variant of Platform SDK 7.0a. Thanks.
Aaron Stainback
A: 

Try this in your environment

set SdkTools=c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin 

call "%SdkTools%\SetEnv.Cmd" /xp /x86 

assuming that's where you have the Windows SDK installed. Info is from here - there may be more to do, but this looks on the right track to me.

Steve Townsend