2012-07-25 92 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