2

我想知道是否有人可以帮助我解决这个问题。

我从http://www.stahlke.org/dan/gnuplot-iostream/检索到 gnuplot-iostream 接口的源代码。但是,当我尝试使用以下命令编译代码时:

]$ cmake .; make

我收到以下编译器错误

/.../gnuplot-iostream.h: In constructor ‘Gnuplot::Gnuplot(const std::string&)’:
/.../gnuplot-iostream.h:427: error: ‘never_close_handle’ is not a member of ‘boost::iostreams’

我正在使用 Scientific Linux 6.2(内核 2.6.32-220.23.1.el6.x86_64)、g++ 4.4.6,并安装了 boost 库(/usr/include/boost/iostreams/ 存在)。

任何帮助将不胜感激。

D

4

2 回答 2

2

enum file_descriptor_flagsboost::iostreams仅在 1.44.0 中添加。

enum file_descriptor_flags
{
    never_close_handle = 0,
    close_handle = 3
};
于 2012-07-25T12:30:11.273 回答
2

因此,解决方案是简单地更新 boost 库(感谢 ForEveR)。

但是,如果像我一样,您无权更新系统上的库,您应该注意,我能够通过简单地替换 gnuplot 中的两次 boost::iostreams::never_close_handle 来强制编译并获得基本功能-iostream.h 文件为 0。

于 2012-07-25T18:17:04.290 回答