简体   繁体   English

在其他硬盘上安装C ++ Boost库

[英]Installing C++ Boost library on different hard drive

I'm still pretty inexperienced with C++ but I need to install Boost 1.6.1. 我对C ++仍然缺乏经验,但是我需要安装Boost 1.6.1。

I just want to do it with the minimum hassle possible. 我只是想以最小的麻烦做到这一点。

I'm using visual studio 2015 for development, which is installed on my C drive. 我正在使用Visual Studio 2015进行开发,该安装在我的C驱动器上。 The problem is I don't have much space left on my C drive . 问题是我的C驱动器上没有剩余空间。

Is it possible to install boost on my D drive? 是否可以在我的D盘上安装boost?

Can someone explain to me step by step how to so this or point me to a good step by step tutorial that explains how to do this? 有人可以一步一步地向我解释如何做到这一点,还是可以向我介绍一个很好的循序渐进的教程来说明如何做到这一点?

Thanks 谢谢

  1. Download my Boost Build Environment . 下载我的Boost Build Environment
  2. Extract it to the root of your D drive. 将其解压缩到D驱动器的根目录。 It will create a boost_build_environment directory. 它将创建一个boost_build_environment目录。
  3. Open the MSBuild Command Prompt for VS2015 . 打开VS2015MSBuild命令提示符
  4. CD into D:\\boost_build_environment. CD放入D:\\ boost_build_environment。
  5. Build boost as follows. 如下构建增强。

    msbuild /nologo /target:BuildAll BuildBoost.proj msbuild / nologo / target:BuildAll BuildBoost.proj

  6. Run the CleanAll target as follows. 如下运行CleanAll目标。

    msbuild /nologo /target:CleanAll BuildBoost.proj msbuild / nologo / target:CleanAll BuildBoost.proj

  7. Have fun using Boost. 使用Boost玩得开心。

The magic is in the Microsoft.Cpp.Win32.user.props and Microsoft.Cpp.x64.user.props files, which are copied into $(LOCALAPPDATA)\\Microsoft\\MSBuild\\v4.0 by the CopyProps target. 神奇之处在于Microsoft.Cpp.Win32.user.props和Microsoft.Cpp.x64.user.props文件,这些文件由CopyProps目标复制到$(LOCALAPPDATA)\\ Microsoft \\ MSBuild \\ v4.0中 These props files are automatically imported by most, if not all project files. 这些道具文件将由大多数(如果不是全部)项目文件自动导入。 They set the AdditionalIncludeDirectories and AdditionalLibraryDirectories lists so that ICU and Boost will be found. 他们设置了AdditionalIncludeDirectories和AdditionalLibraryDirectories列表,以便找到ICU和Boost。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM