gnuplot-iostream 无法编译

gnuplot-iostream won't compile

本文关键字:编译 gnuplot-iostream      更新时间:2023-10-16

我想知道是否有人能帮我。

我已经从中检索到gnuplot iostream接口的源代码http://www.stahlke.org/dan/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(kernal 2.6.32-220.23.1.el6.x86_64),g++4.4.6,并安装了boost库(/usr/include/boost/iostreams/exists)。

如有任何协助,我们将不胜感激。

D

enum file_descriptor_flags仅在1.44.0中添加到boost::iostreams中。

enum file_descriptor_flags
{
    never_close_handle = 0,
    close_handle = 3
};

因此,解决方案只需更新boost库(感谢ForEveR)。

但是,如果你和我一样,没有权限更新系统上的库,你应该注意,我可以通过用0替换gnuplot iostream.h文件中出现的两个boost::iostreams::never_close_handle来强制编译并获得基本功能。