boost threadpool库中的问题

时间:2009-11-09 05:00:22

标签: c++ boost threadpool

我想从开源(http://threadpool.sourceforge.net/)使用boost threadpool库我得到了示例程序本身的complilation错误。

/ 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] A:

/ usr / include / boost /./ threadpool /./ detail / pool_core.hpp:331:从âboolboin:: 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:从âstaticvoidboost :: 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&gt ;, 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:错误:âclassboin::recursive_mutexâ没有名为âlockâ的成员

/ usr / include / boost /./ threadpool /./ detail / locking_ptr.hpp:在析构函数中âboost:: threadpool :: detail :: locking_ptr :: ~locking_ptr()[with T = boost :: threadpool :: detail :: pool_core&gt;,boost :: threadpool :: fifo_scheduler,boost :: threadpool :: static_size,boost :: threadpool :: resize_controller,boost :: threadpool :: wait_for_all_tasks&gt;,Mutex = boost :: recursive_mutex]â:< / p>

/ usr / include / boost /./ threadpool /./ detail / pool_core.hpp:331:从âboolboin:: threadpool :: detail :: pool_core :: resize(size_t)volatile实例化[with Task = boost: :function0&gt;,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:从âstaticvoidboost :: threadpool :: static_size :: init(Pool&amp;,size_t)实例化[with Pool = boost :: threadpool :: detail :: pool_core&gt;,boost :: threadpool :: fifo_scheduler,boost :: threadpool :: static_size,boost :: threadpool :: resize_controller,boost :: threadpool :: wait_for_all_tasks&gt;]â

/ usr / include / boost /./ threadpool / pool.hpp:103:从âboost:: threadpool :: thread_pool :: thread_pool(size_t)实例化[with Task = boost :: function0&gt ;, 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:错误:âclassboin::recursive_mutexâ没有名为âunlockâ的成员

有人可以帮忙解决这个问题吗?

此致 阿南丹

1 个答案:

答案 0 :(得分:2)

似乎它与您安装的升级版本不兼容。你有什么Boost版本?