2012-07-25 93 views
2

我想知道是否有人可以帮助我。gnuplot-iostream不会编译

我已经从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’ 

我用科学的Linux 6.2(籽粒2.6.32-220.23.1。 el6.x86_64),g ++ 4.4.6,并且安装了boost库(/ usr/include/boost/iostreams/exists)。

任何援助将非常感激。

d

+0

版本的boost? – ForEveR 2012-07-25 12:17:23

回答

2

enum file_descriptor_flagsboost::iostreams仅在1.44.0加入。

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

是的,就是这样!安装在我们系统上的boost版本是1.41。将必须得到系统管理员到此:(干杯为您的帮助ForEveR – dmon 2012-07-25 17:56:19

2

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

但是,如果像我一样,你没有权限更新系统上的库,你应该注意到我能够强制编译并通过简单地替换boost :: iostreams :: never_close_handle在gnuplot-iostream.h文件中为0.

+0

我喜欢它,当一个很好的黑客来临时:-)(+1) – mgilson 2012-07-25 19:54:08