在Windows上使用升压(Visual Studio中) [英] Using Boost on Windows (Visual Studio)

查看:188
本文介绍了在Windows上使用升压(Visual Studio中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Boost上手。我在Visual Studio(在Windows计算机上明显)编程的C ++程序。

Boost的入门指南说:


  

获得加速的副本最简单的方法是为使用安装程序。本入门指南的升压网站的版本将有安装未注明日期的信息,因为他们成为可用,或见升压下载或通过BoostPro计算所提供的安装程序。 我们强烈建议您使用一个安装程序,如果您使用Microsoft Visual Studio 后,因为安装程序可以下载并安装precompiled二进制库,为您节省自行构建他们的麻烦。


我如果我想按照这个建议,或者只是下载并构建自己的一切有点不确定。我使用安装程序看到潜在的问题是:


  1. 的东西不再是自包含的(即每个团队成员都有安装升压,然后配置Visual Studio中识别它)。

  2. 我不能让源代码控制升压(我就喜欢最好它是像其他一切我的源代码控制索里的文件)。 (修改:由评论来看,它看起来像升压是有点大(如5 GB),所以很明显我需要保持它只有部分源代码控制下进行!)

所以我的问题是,我只是被偏执和应该去安装路径,还是我改正,应该建立它自己?如果任何人有任何与升压和Visual Studio的工作经验,我希望AP preciate,如果他们能在此分享他们的意见(如果它应该是建立它自己,任何提示也将是AP preciated,例如,我应该只复制每一个文件,我实际使用?等等)。

注意:

在计算器上

有几个类似的问题,但并没有明确要求这一点,让我觉得我不应该使用安装程序,这就是为什么我问它明确在这里。作为参考,这些都是问题:


  1. 升压链接时,Visual Studio和放大器;版本控制

  2. Including有关Boost库用C ++源(使用Visual Studio)


解决方案

要确保每个人的一个好办法拥有一切正确配置是SVN外部使用。您可以创建类似 /trunk/boost1.35 ,然后你可以指向与外部SVN

这方式提升的新版本出来,你可以重新指向你的svn外部 /trunk/boost1.40

在你的仓库,你的svn外部指向你的资料库中的文件夹SVN。例如 /取决于/升压

我们亲自保持升压头文件源代码控制之下的描述,但保留库作为我们要求大家下载的zip。我们有一个环境变量,像下面这样BOOST_LIB,我们指出这一点在当前Boost库目录。

I want to get started using Boost. I'm programming a C++ program in Visual Studio (obviously on a Windows machine).

Boost's Getting Started Guide says:

The easiest way to get a copy of Boost is to use an installer. The Boost website version of this Getting Started guide will have undated information on installers as they become available, or see Boost downloads or the installer provided by BoostPro Computing. We especially recommend using an installer if you use Microsoft Visual Studio, because the installer can download and install precompiled library binaries, saving you the trouble of building them yourself.

I'm a little unsure if I want to follow this advice, or just download and build everything myself. Potential problems that I see with an installer are:

  1. Things are no longer self-contained (i.e. every team member has to install Boost, then configure Visual Studio to recognize it).
  2. I can't keep Boost under source control (I would ideally like it to be soure files in my source control like everything else). (Edit: Judging by the comments, it looks like boost is kinda large (as in 5 GB!), so obviously I'd need to keep only parts of it under source control).

So my question is, am I just being paranoid and should go the installer route, or am I correct and should build it myself? If anyone has any experience working with Boost and Visual Studio, I'd appreciate if they could share their views on this (and if it should be to build it myself, any tips would also be appreciated, for example should I only copy every file that I actually use? etc.).

Note:

A few similar questions on StackOverflow, but which didn't ask this explicitly, make me think that I shouldn't use the installer, which is why I'm asking it explicitly here. For reference, these are the questions:

  1. Boost linking, Visual Studio & version control
  2. Including Relevant Boost Libraries with C++ Source (Using Visual Studio)

解决方案

A good way to make sure everyone has everything configured properly is to use svn externals. You can create something like /trunk/boost1.35 and then you can point to that with an svn external.

That way as new versions of boost come out, you can just repoint your svn external to /trunk/boost1.40

In your repository, your svn external points to that svn folder within your repository. Example /depends/boost

We personally keep the boost header files under source control as described but keep the libs as a zip that we require everyone to download. We have an environment variable something like the following BOOST_LIB and we point that to the current boost library directory.

这篇关于在Windows上使用升压(Visual Studio中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆