boost - 如何将 boost 库 1_65 或 1_64 添加到 Visual Studio 2017 项目?

标签 boost visual-studio-2017

我正在尝试将 boost 1_64(boost 1_65 也可以工作)添加到我的 Visual Studio 2017 项目中,其中包括 boost/array.hpp 和 boost/asio.hpp 并使用了各种相同的方法。

我使用了以下方法https://studiofreya.com/2017/04/23/building-boost-1-64-with-visual-studio-2017/但我收到错误:无法打开源文件“boost/array.hpp”,也无法打开源文件“boost/asio.hpp”以及有关 boost 方法的其他错误。

最佳答案

该错误意味着您尚未添加 boostVC++ Directories .
添加它们:

  • 打开 Property Manager来自 View -> Other Windows菜单。
  • 单击项目并向下导航至 Microsoft.Cpp.x64.user .
  • 右键单击并选择 Properties .
  • 开通 Common Properties并选择 VC++ Directories
  • 添加安装目录boostInclude Directories
  • 添加你构建的目录boost图书馆到 Library Directories

  • 另见 Boost Getting Started on Windows万一你卡在别处。

    关于boost - 如何将 boost 库 1_65 或 1_64 添加到 Visual Studio 2017 项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45974108/

    相关文章:

    asp.net-mvc - 配置错误 Azure Key Vault 作为 Visual Studio Connected Service ConfigurationBuilder

    .net - TFS 2015 构建模板无法构建 C#7 功能

    boost - CMake 找到 Boost,但导入的目标不适用于 Boost 版本

    c++ - MinGw 4.7.0 不使用#include <boost/thread> 编译代码

    c++ - 带有 boost directory_iterator 的 Max_element

    sql-server - SSIS - 包在 VS 中工作,失败并显示 "Failed to compiled scripts contained in the package"。包中没有脚本对象

    c# - 如何在 VS 2017 for ASP.NET Core 项目中按路径段嵌套文件

    c++ - 在 boost 变体中使用相同的数据类型

    c++ - 从 boost vector 中删除条目

    visual-studio-2017 - 如何构建 Apache APR-Util v1.6.0 库