Boost Libraries and Visual Studio 2013

Boost Libraries and Visual Studio 2013

本文关键字:Studio 2013 Visual and Libraries Boost      更新时间:2023-10-16

我已经通过命令行(命令提示符)使用MSVC工具集安装了boost。

现在,我想知道我的项目属性中应该包括哪些目录。

当我在我的项目中添加以下行时:

#include <filesystemfstream.hpp>

它抛出以下错误:

1>c:boostboost_1_56_0boostfilesystemfstream.hpp(15): fatal error C1083: 
Cannot open include file: 'boost/config.hpp': No such file or directory

我已经为库的项目属性目录添加了以下内容:

C:boostboost_1_56_0boost
C:boostboost_1_56_0stagelib

这就是我添加上述路径的地方:

(Project->Properties->VC++ Directories->Library Directories

不要将boost子目录添加到搜索路径中;添加父

C:boostboost_1_56_0

并在包含标头时指定boost目录

#include <boost/filesystem/fstream.hpp>   // Better to use / not  for portability

Boost标头彼此包含类似的内容(路径中有boost/),因此现在也可以找到它们。