简体   繁体   English

在 Windows 10 上使用 Visual Studio 2019 获取 Boost 1.71.0 库的错误

[英]Getting error for Boost 1.71.0 library with Visual Studio 2019 on windows 10

I am using the latest Boost library version(1.71.0) with Visual Studio 2019 on Windows 10 but I am getting the error while compiling the example code.我在 Windows 10 上将最新的 Boost 库版本 (1.71.0) 与 Visual Studio 2019 一起使用,但在编译示例代码时出现错误。 Is Boost 1.71.0 version compatible with visual studio 2019? Boost 1.71.0 版本是否兼容 visual studio 2019?

Installation process:安装过程:

1) Downloaded the latest package from https://www.boost.org/ 1) 从https://www.boost.org/下载最新的包

2) Extracted the package and ran the "bootstrap.bat" file in cmd. 2) 解压缩包并在cmd 中运行“bootstrap.bat”文件。

3) Ran./b2 3) 随机/b2

4) Provided the path of created library and include folder in visual studio. 4) 提供了在visual studio 中创建的库和include 文件夹的路径。

Include Dir: C:\libraries\boost_1_71_0包含目录:C:\libraries\boost_1_71_0

Lib Dir: C:\libraries\boost_1_71_0\stage\lib库目录:C:\libraries\boost_1_71_0\stage\lib

Error: fatal error C1083: Cannot open include file: 'boost/iostreams/tee.hpp':错误:致命错误 C1083:无法打开包含文件:“boost/iostreams/tee.hpp”:

you should Add include directory to your project: Right click on The project then:您应该将包含目录添加到您的项目中:右键单击该项目然后:

properties ==> C/C++ ==> Additional include directory ==> C:\libraries\boost_1_71_0\include属性 ==> C/C++ ==> 附加包含目录 ==> C:\libraries\boost_1_71_0\include

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

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