我完全不能包含升压头 [英] I completely cannot include boost headers

查看:55
本文介绍了我完全不能包含升压头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个Boost的文件系统",所以我下载并成功构建了整个Boost.它的目录是 C:\ Program Files \ Boost \ boost_1_60_0 \ boost

I needed a boost's "filesystem" so I downloaded and successfully build the whole boost. Its directory is C:\Program Files\Boost\boost_1_60_0\boost

然后我创建了一个vs项目,并指定包含目录,其他包含目录和库目录.几种方法.试图将其添加到系统路径,并手动使用setx创建了系统变量bouth.

Then I created a vs project and specified include directories, additional include directories and library directories. A couple of ways. Tried to add it to the system path, created a system variable bouth with setx an manually.

C:\Program Files\Boost\boost_1_60_0; $(BOOST_ROOT); 
"evaluetes to" C:\Program Files\Boost\boost_1_60_0 

但是我仍然不能包含和使用任何东西.

But I still can't include and use anything.

#include <boost\filesystem> // error
#include "boost//filesystem.hpp" //error
#include <boost\filesystem.hpp> //error
#include "C://Program Files//Boost//boost_1_60_0//boost" //error

// those are working but still useless due to includes in the "filesystem.hpp"
#include "C:\Program Files\Boost\boost_1_60_0\boost\filesystem.hpp"
#include <C:\Program Files/Boost//boost_1_60_0\boost\filesystem.hpp>


#include <filesystem> // does not give an error, but following 
using namespace boost::filesystem; //still does

顺便说一句,几周前,我在同一个想法中进行了工作.一切都还好,但是不确定当时如何使它工作.

By the way, I worked with boost in this same ide a couple of weeks ago. And things were ok, not sure how I got it working back then though.

可能有什么问题吗?我有点迷路了.

What could possibly be wrong? I'm kind of lost.

推荐答案

假定您已经构建了该库.您需要右键单击Visual Studio项目,然后单击 Properties .

Assuming you already built the library. You need to right-click on your Visual Studio project and click Properties.

您可以在这些图片上看到,在 C:\ Program Files \ Boost \ boost_1_60_0 其他库目录中指定其他包含目录>到 C:\ Program Files \ Boost \ boost_1_60_0 \ stage \ lib :

As you can see on those pictures, specify the Additional Include Directories to C:\Program Files\Boost\boost_1_60_0 and Additional Library Directories to C:\Program Files\Boost\boost_1_60_0\stage\lib:

然后单击确定

要包含boost文件系统,请写:

To include the boost filesystem write:

#include <boost/filesystem.hpp>

让我知道在此之后您是否仍然遇到问题.

Let me know if you're still having problems after this.

这篇关于我完全不能包含升压头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆