如何将 boost 库 1_65 或 1_64 添加到 Visual Studio 2017 项目? [英] How to add boost library 1_65 or 1_64 to Visual Studio 2017 project?
问题描述
我正在尝试将 boost 1_64(boost 1_65 也可以)添加到我的 Visual Studio 2017 项目中,该项目包括 boost/array.hpp 和 boost/asio.hpp,并使用了各种相同的方法.
I am trying to add boost 1_64 (boost 1_65 will also work) to my Visual Studio 2017 project which includes boost/array.hpp and boost/asio.hpp and used various methods of the same.
我使用了以下方法 https://studiofreya.com/2017/04/23/building-boost-1-64-with-visual-studio-2017/ 但我收到错误:无法打开源文件boost/array.hpp",无法打开源文件boost/asio.hpp"等关于boost方法的错误.
I have used the following method https://studiofreya.com/2017/04/23/building-boost-1-64-with-visual-studio-2017/ but I am getting error: cannot open source file "boost/array.hpp" and cannot open source file "boost/asio.hpp" and other errors on the methods of boost.
推荐答案
该错误暗示您尚未将 boost
添加到 VC++ 目录
.
添加它们:
The error implies that you haven't added boost
to the VC++ Directories
.
To add them:
从
View
->Other Windows
菜单打开Property Manager
.
Open the
Property Manager
from theView
->Other Windows
menu.
点击项目并向下导航到 Microsoft.Cpp.x64.user
.
Click on the project and navigate down to Microsoft.Cpp.x64.user
.
右键单击并选择属性
.
打开Common Properties
并选择VC++ Directory
将安装boost
的目录添加到Include Directory
将您构建boost
库的目录添加到Library Directory
Add the directory where you builtboost
libraries to Library Directories
另请参阅Windows Boost 入门万一你卡在别处.
Also see Boost Getting Started on Windows in case you get stuck elsewhere.
这篇关于如何将 boost 库 1_65 或 1_64 添加到 Visual Studio 2017 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!