boost thread 使用, 编译失败, 求助
boost 版本: boost_1_57_0
gcc 版本: 4.7.4
程序中包含头文件: #include <boost/thread/thread.hpp>
编译失败,错误信息如下:
In file included from /usr/include/boost/smart_ptr/enable_shared_from_this.hpp:16:0,
from /usr/include/boost/enable_shared_from_this.hpp:16,
from /usr/include/boost/thread/pthread/thread_data.hpp:17,
from /usr/include/boost/thread/thread_only.hpp:17,
from /usr/include/boost/thread/thread.hpp:12,
from ../src/main.cpp:33:
/usr/include/boost/smart_ptr/weak_ptr.hpp:32:37: error: ‘sp_element’ in namespace ‘boost::detail’ does not name a type
/usr/include/boost/smart_ptr/weak_ptr.hpp:32:47: error: expected unqualified-id before ‘<’ token