[英]Boost Libraries and Visual Studio 2013
我已經通過命令行(命令提示符)使用MSVC工具集安裝了boost。
現在,我想知道我的項目屬性中應包括哪些目錄。
自從我在項目中添加以下行以來:
#include <filesystem\fstream.hpp>
它引發以下錯誤:
1>c:\boost\boost_1_56_0\boost\filesystem\fstream.hpp(15): fatal error C1083:
Cannot open include file: 'boost/config.hpp': No such file or directory
我在庫的項目屬性目錄中添加了以下內容:
C:\boost\boost_1_56_0\boost
C:\boost\boost_1_56_0\stage\lib
這是我添加上述路徑的地方:
(Project->Properties->VC++ Directories->Library Directories
不要將boost
子目錄添加到搜索路徑; 添加父母
C:\boost\boost_1_56_0
並在包含標頭時指定boost
目錄
#include <boost/filesystem/fstream.hpp> // Better to use / not \ for portability
Boost標頭這樣包含彼此(在路徑中帶有boost/
),因此現在也可以找到它們。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.