- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用来自开源的 boost 线程池库 (http://threadpool.sourceforge.net/) 我在示例程序本身遇到编译错误。
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp: 在构造函数中 âboost::threadpool::detail::locking_ptr::locking_ptr(volatile T&, const volatile Mutex&) [with T = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>, Mutex = boost::recursive_mutex ]â:
/usr/include/boost/./threadpool/./detail/pool_core.hpp:331:从 bool boost::threadpool::detail::pool_core::resize(size_t) volatile [with Task = boost: :function0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
/usr/include/boost/./threadpool/size_policies.hpp:75: 从 âstatic void boost::threadpool::static_size::init(Pool&, size_t) [with Pool = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>]â
/usr/include/boost/./threadpool/pool.hpp:103:从boost::threadpool::thread_pool::thread_pool(size_t) [with Task = boost::function0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
./example/mergesort/mergesort.cpp:152: 从这里实例化
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:50: 错误:类 boost::recursive_mutex 没有名为“锁”的成员
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:在析构函数中âboost::threadpool::detail::locking_ptr::~locking_ptr() [with T = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>, Mutex = boost::recursive_mutex]â:
/usr/include/boost/./threadpool/./detail/pool_core.hpp:331:从 bool boost::threadpool::detail::pool_core::resize(size_t) volatile [with Task = boost: :function0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
/usr/include/boost/./threadpool/size_policies.hpp:75: 从 âstatic void boost::threadpool::static_size::init(Pool&, size_t) [with Pool = boost::threadpool::detail::pool_core >, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>]â
/usr/include/boost/./threadpool/pool.hpp:103:从boost::threadpool::thread_pool::thread_pool(size_t) [with Task = boost::function0 >, SchedulingPolicy = boost::threadpool::fifo_scheduler, SizePolicy = boost::threadpool::static_size, SizePolicyController = boost::threadpool::resize_controller, ShutdownPolicy = boost::threadpool::wait_for_all_tasks]â
./example/mergesort/mergesort.cpp:152: 从这里实例化
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp:58: 错误:类 boost::recursive_mutex 没有名为“unlock”的成员
有人可以帮助解决这个问题吗?
问候,阿南丹
最佳答案
它似乎与您安装的 boost 版本不兼容。你有什么 Boost 版本?
关于c++ - boost线程池库中的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1699170/
我是一名优秀的程序员,十分优秀!