|
Boost Users : |
Subject: Re: [Boost-users] Implications of using Boost with different versions of Visual Studio in the same computer?
From: Andrew Holden (aholden_at_[hidden])
Date: 2011-01-13 12:10:30
On January 13, 2011 11:41 AM, Ramon F Herrera wrote:
> I have installed MSVS-2005 and MSVS-2010 in my development
> PC. I noticed that contrary to other libraries, every boost
> installation seems to be specific for:
>
> - The Boost version (duh!)
>
> - The MSVC Version
>
> For instance: libboost_system-vc80-mt-1_43.lib
>
> I would prefer to have all the -vc80- and -vc100- library
> files in the same folder, but perhaps I am looking for
> trouble? Then there is the issue of the includes.
I have run into no problems installing multiple boost builds into the
same directory. At times, I have had libraries for 3 different boost
versions and 4 compilers all in the same directory.
I normally use the bjam "install" option to get a directory tree with
only the libraries and includes in it. By default, install builds the
following tree:
C:\boost
+ lib
+ (lib and dll files here)
+ include
+ boost-version
+ boost
+ massive tree for .hpp files here
As far as I can tell, the .hpp files are not customized for the compiler
version, so all compilers can share the same set of .hpp files. Also,
the fact that each boost version gets its own directory under include
means that multiple boost versions can coexist.
The one caveat is that 32-bit and 64-bit builds can NOT install into the
same directory.
Others have had good luck doing similar things with bjam's "stage"
option, but I have no experience with that option. I believe the same
provisos apply.
> If such strategy turns out to be ill-advised, I would like
> to somehow "hide" my MSVS-2010 (don't want to uninstall it!)
> and then install Boost, built bye the VS-2005 toolchain.
Some bjam options to control which toolset to use:
toolset=msvc-8.0 Build using Visual Studio 2005
toolset=msvc-10.0 Build using Visual Studio 2010
address-model=32 Build using a 32-bit compiler
address-model=64 Build using a 64-bit compiler
--prefix=C:\your_target_directory Install into a certain directory
--stagedir=your_target_directory Stage into a certain
directory(useful for building both 32-bit and 64-bit)
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