2013-04-28 52 views
0

我想編譯https://code.google.com/p/feed-reader-lib/但在Feed.cpp它給了我一個奇怪的錯誤。試圖編譯助推依賴庫 - 「是私人」的錯誤

/usr/include/boost/thread/pthread/recursive_mutex.hpp:40:9: error: ‘boost::recursive_mutex::recursive_mutex(const boost::recursive_mutex&)’ is private 
Feed.cpp:49:69: error: within this context 

我還沒有與C++太陌生,所以我絕對不能解釋這可能是錯在這裏,因爲編譯器在聲明狀態引發此錯誤。沒有關於上述庫可能是錯誤的 - 而是,在我看來,提升庫是錯誤的(因爲它錯誤地使boost::recursive_mutex::recursive_mutex(const boost::recursive_mutex&)私人)。但肯定不是這種情況。

我在這裏錯過了什麼?

回答

0

您收到的錯誤消息意味着有試圖複製不可複製的recursive_mutex。打開Feed.cpp並更改以下行:

boost::recursive_mutex Feed::m_stateMutex = boost::recursive_mutex(); 

要這樣:

boost::recursive_mutex Feed::m_stateMutex;