尝试使用 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到的问题是我没有像我想象的那样正确地包含升压标头。通常我将 boost 安装在硬盘上的某个目录中,例如 C:\Boost\some_boost_version。虽然我以为我指向的是 C:\Boost\boost-1_47\boost 中的新 boost 版本,但目录树中没有 \boost 的级别,所有内容都在 C:\Boost\boost-1_47 中。通过添加一个新目录(创建 C:\Boost\boost-1_47\boost)并将包含内容放入其中,我的问题得到了解决。当我重新设计构建脚本以在我的机器上构建 boost 库时,我忽略了一些事情。
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.