简体   繁体   English

当我安装了多个Visual Studio版本时,如何使用Visual Studio 2008构建增强功能?

[英]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) 但是,我需要为Visual Studio 2008构建库(vc9)

I tried using toolset=vc9 but I get problems/no success. 我尝试使用toolset = vc9,但我遇到问题/没有成功。

How can I build the libs for vc9? 如何为vc9构建库?

After I run boostrap I try running 运行boostrap之后我尝试运行

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 \\ toolset.jam:39:在toolset.using规则vc9.init模块工具集中未知

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: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 \\ 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 \\ modules.jam:283:导入

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 \\ tools \\ build \\ v2 / kernel / bootstrap.jam:142:在boost-build中

C:\\Development\\boost 50\\boost_1_50_0\\boost_1_50_0\\boost-build.jam:17: in module scope C:\\ Development \\ boost 50 \\ boost_1_50_0 \\ boost_1_50_0 \\ boost-build.jam:17:在模块范围内

toolset=msvc-9.0 工具集= MSVC-9.0

I have VS2008-Pro and VS2010-Express installed. 我安装了VS2008-Pro和VS2010-Express。 The default ran with VS2010. 默认情况下使用VS2010运行。 Setting toolset=msvc-9.0 caused the build to run with VS2008. 设置工具集= msvc-9.0导致构建与VS2008一起运行。 Using Boost 1.51.0. 使用Boost 1.51.0。

You'll need to dig into the How-To-Build-Boost documentation, and in particular see this ; 您需要深入了解How-To-Build-Boost文档,特别是看到这一点 ; but the part you need to specify a particular MSVC version is pointed to here . 但是这里指的是指定特定MSVC版本所需的部分。 That suggests creating a user-config.jam , which probably would work, but I created a project-config.jam file instead. 这表明创建一个user-config.jam ,这可能会起作用,但我创建了一个project-config.jam文件。

I seem to be able to do this by running the top-level boost build (or meta build) script from different VC command lines. 我似乎能够通过从不同的VC命令行运行顶级boost构建(或元构建)脚本来做到这一点。 For example to build with VC2012, start a command line with vc 2012 vars. 例如,要使用VC2012构建,请使用vc 2012 vars启动命令行。 And for 2010, do the same. 对于2010年,做同样的事情。 The automatically generated build scripts seem to do the right thing. 自动生成的构建脚本似乎做得对。

I am sure there are ways to do this by editing the build scripts myself or by setting the toolset, but I had no success with that. 我确信有办法通过自己编辑构建脚本或设置工具集来实现这一点,但我没有成功。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用新的Visual Studio 2013预览构建增强功能? - How do I build boost with new Visual Studio 2013 preview? 在Visual Studio 2008中调试时如何管道输出? - How do I pipe output when debugging in Visual Studio 2008? 如何解决此链接器错误(unicode,boost,TCHAR / tstring(visual studio 2008)) - How do I resolve this linker error (unicode, boost, TCHAR/tstring (visual studio 2008)) 如何在Visual Studio中构建具有不同依赖性版本的多个产品? - How can I build multiple products with different dependency versions in Visual Studio? 如何确保在修改.h文件时,使用Visual Studio 2008在Release版本中自动编译包括它的.cc文件? - How do I make sure that when a .h file is modified, the .cc files including it are compiled automatically in a Release build using Visual Studio 2008? 如何使用Visual Studio 2013 CTP构建Boost 1.55 2013年11月 - How do I build Boost 1.55 with Visual Studio 2013 CTP November 2013 如何在命令行上构建Visual Studio 2008 C ++项目的所有配置? - How do I build all configurations of a Visual Studio 2008 C++ project on the command line? 如何优雅地更新通过 Visual Studio 中的 NuGet 获得的提升? - How do I gracefully update boost which have been got via NuGet in Visual Studio? 如何在Visual Studio 2008中启动新的CUDA项目? - How do I start a new CUDA project in Visual Studio 2008? 如何在visual studio 2008中为我的应用程序设置图标? - How do I set the icon for my application in visual studio 2008?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM