尝试利用boost :: asio :: signal_set时无法编译 [英] Cannot compile when trying to utilize boost::asio::signal_set

查看:118
本文介绍了尝试利用boost :: asio :: signal_set时无法编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MinGW 4.5.1来利用最新版的Boost 1_47编译客户端应用程序(C ++,Windows XP).由于某种原因,我似乎无法确定,当我使用boost::asio::signal_set类型进行编译时,出现编译错误(boost::asio::signal_set未定义类型),并且尝试显式地包括任何关联的signal_set时标头中,我抱怨找不到文件(尽管文件确实在预期的位置).我尝试将文件包含在目录树的同一级别中没有问题,它似乎仅挂在signal_set.hpp文件上(尽管使用包含它的完整头文件asio.hpp时没有任何抱怨).尝试使用boost 1_46_1时,我也会得到相同的行为.

I'm using MinGW 4.5.1 for compiling a client application (C++, Windows XP) utilizing the newest version of Boost 1_47. For some reason that I can't seem to determine, when I go to compile using the boost::asio::signal_set type I get a compile error (boost::asio::signal_set does not define a type), and when trying to explicitly include either of the associated signal_set headers, I get complaints of no file can be found (despite the file indeed being where expected). I have tried including files within the same level of the directory tree without issue, it only seems to hang on the signal_set.hpp file (although no complaints when using the full header asio.hpp which has it as an include). I get the same behavior when trying to use boost 1_46_1 as well.

可能有人对发生的事情有任何见解吗?

Might anyone have any insights as to what is going on?

推荐答案

我遇到的问题是,我没有像我想象的那样正确包含boost标头.通常,我在硬盘驱动器上的某个目录中安装了boost安装,例如C:\ Boost \ some_boost_version.我以为我指向的是新的Boost版本,其中包括C:\ Boost \ boost-1_47 \ boost,\ boost的目录树中没有任何级别,所有内容都在C:\ Boost \ boost-1_47中.通过添加一个新目录(创建的C:\ Boost \ boost-1_47 \ boost)并在其中包含include,我的问题得以解决.当我重新构建我的构建脚本以在计算机上构建b​​oost库时,我忽略了一些东西.

The issue I had was that I was not properly including the boost headers as I thought I was. Usually I have the boost installation in some directory on the hard drive, say C:\Boost\some_boost_version. Whereas I thought I was pointing to the new boost version's includes at C:\Boost\boost-1_47\boost, there was not a level inside the directory tree for \boost, everything was in C:\Boost\boost-1_47. By adding a new directory (created C:\Boost\boost-1_47\boost) and putting the includes within that, my problem was resolved. Something I overlooked when I retooled my build scripts for build the boost libraries on my machine.

这篇关于尝试利用boost :: asio :: signal_set时无法编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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