Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I build boost with Visual Studio 2008 when I have multiple Visual Studio versions installed?

I know how to build boost with the latest visual studio on my machine (this question, for example)

However, I need to build the libs for Visual Studio 2008 (vc9)

I tried using toolset=vc9 but I get problems/no success.

How can I build the libs for vc9?

After I run boostrap I try running

b2 toolset=vc9

but the output is:

C:/Development/boost 50/boost_1_50_0/boost_1_50_0/tools/build/v2/build\toolset.jam:39: in toolset.using rule vc9.init unknown in module toolset

C:/Development/boost 50/boost_1_50_0/boost_1_50_0/tools/build/v2\build-system.jam:481: in process-explicit-toolset-requests

C:/Development/boost 50/boost_1_50_0/boost_1_50_0/tools/build/v2\build-system.jam:562: in load

C:\Development\boost 50\boost_1_50_0\boost_1_50_0\tools\build\v2/kernel\modules.jam:283: in import

C:\Development\boost 50\boost_1_50_0\boost_1_50_0\tools\build\v2/kernel/bootstrap.jam:142: in boost-build

C:\Development\boost 50\boost_1_50_0\boost_1_50_0\boost-build.jam:17: in module scope

like image 884
Tim Avatar asked Aug 02 '12 20:08

Tim


People also ask

How do I link my Boost library to Visual Studio?

6.1 Link From Within the Visual Studio IDE Right-click example in the Solution Explorer pane and select Properties from the resulting pop-up menu. In Configuration Properties > Linker > Additional Library Directories, enter the path to the Boost binaries, e.g. C:\Program Files\boost\boost_1_55_0\lib\.

How do I add Boost to my project?

Create a Boost.In the Add New Item dialog, expand Installed > Visual C++ > Test. Select Boost. Test, then choose Add to add Test. cpp to your project.

How do I use Visual Studio code in Boost library?

Linking the Boost libraries on Visual Studio (Note: In case your project builds a static library, the “Linker” menu will be shown as “Librarian”.) Select the drop-down button and then click <Edit..>. Add the following value: C:\Program Files\boost\boost_1_76_0\bin\$(PlatformTarget)\lib , and hit OK.


1 Answers

toolset=msvc-9.0

I have VS2008-Pro and VS2010-Express installed. The default ran with VS2010. Setting toolset=msvc-9.0 caused the build to run with VS2008. Using Boost 1.51.0.

like image 126
user1726157 Avatar answered Oct 20 '22 03:10

user1726157