Implications of using Boost with different versions of Visual Studio in the same computer?

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. 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. Thanks for your kind assistance. -RFH ps: Boost rules!! :-)

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.
You shouldn't have any trouble at all, I do this all the time, as do most of our test runners, John.

Keep in mind that if you're building boost for VS2005 and 2010 you might have to change the HKLM\Software\Microsoft\Microsoft SDKs\Windows CurrentInstallFolder and CurrentVersion regkeys to point at the right windows SDK, otherwise boost will always try to compile for 2010. At least I had to do that when building in parallel for 2008 and 2010. Jeremy
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of John Maddock Sent: Thursday, January 13, 2011 11:47 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Implications of using Boost with differentversions of Visual Studio in the same computer?
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.
You shouldn't have any trouble at all, I do this all the time, as do most of our test runners,
John.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

On 13/01/2011 16:52, Kolb, Jeremy wrote:
Keep in mind that if you're building boost for VS2005 and 2010 you might have to change the HKLM\Software\Microsoft\Microsoft SDKs\Windows CurrentInstallFolder and CurrentVersion regkeys to point at the right windows SDK, otherwise boost will always try to compile for 2010. At least I had to do that when building in parallel for 2008 and 2010.
Bjam automatically identify the latest installed MSVC version unless specified. One can specify "--toolset=msvc-<version>" to bjam to get a specific version. KTC

On 13/01/2011 17:01, KTC wrote:
On 13/01/2011 16:52, Kolb, Jeremy wrote:
Keep in mind that if you're building boost for VS2005 and 2010 you might have to change the HKLM\Software\Microsoft\Microsoft SDKs\Windows CurrentInstallFolder and CurrentVersion regkeys to point at the right windows SDK, otherwise boost will always try to compile for 2010. At least I had to do that when building in parallel for 2008 and 2010.
Bjam automatically identify the latest installed MSVC version unless specified. One can specify "--toolset=msvc-<version>" to bjam to get a specific version.
KTC
Erm yeah, that should had been "toolset=<toolset-name>" without the "--". KTC

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)
participants (5)
-
Andrew Holden
-
John Maddock
-
Kolb, Jeremy
-
KTC
-
Ramon F Herrera