Boost logo

Boost Users :

Subject: Re: [Boost-users] How to build for the VS version that I have loaded the vcvars for ?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-07-29 17:56:39


AMDG

Timothy Madden wrote:
> I have a project that I would like to include boost in, and I would
> like to build boost as part of my project build process.
>
> However on a computer with both Visual Studio 2008 and Visual Studio
> 2010 installed the .\bjam command will build the libraries for VS
> 2010, even though my project compiles with VS 2008.
>
> It is pretty useless to build the 2010 libraries for a 2008 project,
> because they have different names and can not be used from one Visual
> Studio version to another.
>
> Is there a way for the boost build procedure to compile libraries for
> the Visual Studio version that the environment variables currently
> point to ?

Boost.Build always uses the registry to find VS.
The environment is only used as a last resort.

> I mean if I build boost with make from a VS 2008 project than the
> environment variables will point to the VS 2008 installation, and if I
> build boost with make from a VS 2010 project than the environment
> variables will point to the VS 2010 installation. Can I get bjam to
> build boost for the currently loaded configuration, and not the latest
> version that can be found installed ?

You can put

using msvc : 9.0 ;

in your user-config.jam. (You can edit the
project-config.jam in the Boost root directory)

You can declare multiple versions, the first is
the default, and you can select which one to
build with by running bjam msvc-9.0, for example.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net