gpt4 book ai didi

c++ - 我要链接什么来定义 boost::thread_specific_ptr 和相关的?

转载 作者:搜寻专家 更新时间:2023-10-31 01:19:28 25 4
gpt4 key购买 nike

我想使用 boost::thread_specific_ptr 但需要知道将什么添加到我的 gcc v3.4.6 链接行以定义它使用什么:

/usr/include/boost/thread/tss.hpp:35: undefined reference to `boost::thread_resource_error::thread_resource_error()'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost6detail3tssC1EPNS_9function1IvPvSaINS_13function_baseEEEE+0x5b):/usr/include/boost/thread/tss.hpp:35: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost6detail3tssC1EPNS_9function1IvPvSaINS_13function_baseEEEE+0x60):/usr/include/boost/thread/tss.hpp:35: undefined reference to `typeinfo for boost::thread_resource_error'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost6detail3tssC1EPNS_9function1IvPvSaINS_13function_baseEEEE+0x76):/usr/include/boost/thread/tss.hpp:38: undefined reference to `boost::detail::tss::init(boost::function1<void, void*, std::allocator<boost::function_base> >*)'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost6detail3tssC1EPNS_9function1IvPvSaINS_13function_baseEEEE+0xd2):/usr/include/boost/thread/tss.hpp:43: undefined reference to `boost::thread_resource_error::thread_resource_error()'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost6detail3tssC1EPNS_9function1IvPvSaINS_13function_baseEEEE+0xf8):/usr/include/boost/thread/tss.hpp:43: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost6detail3tssC1EPNS_9function1IvPvSaINS_13function_baseEEEE+0xfd):/usr/include/boost/thread/tss.hpp:43: undefined reference to `typeinfo for boost::thread_resource_error'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZNK5boost19thread_specific_ptrIN5Botan14AutoSeeded_RNGEE3getEv+0x11): In function `boost::thread_specific_ptr<Botan::AutoSeeded_RNG>::get() const':
/usr/include/boost/thread/tss.hpp:89: undefined reference to `boost::detail::tss::get() const'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost19thread_specific_ptrIN5Botan14AutoSeeded_RNGEE5resetEPS2_+0x2f): In function `boost::thread_specific_ptr<Botan::AutoSeeded_RNG>::reset(Botan::AutoSeeded_RNG*)':
/usr/include/boost/thread/tss.hpp:97: undefined reference to `boost::detail::tss::set(void*)'
../../src/utility/ARCH.linux_26_i86/debug/libmyApp.a(system.o)(.gnu.linkonce.t._ZN5boost19thread_specific_ptrIN5Botan14AutoSeeded_RNGEE5resetEPS2_+0x4a):/usr/include/boost/thread/tss.hpp:98: undefined reference to `boost::detail::tss::cleanup(void*)'

我应该链接什么来定义所有这些?

最佳答案

在我的 Ubuntu 系统上,我使用 -lboost_thread(因为 libboost_thread.so 已经在我的 /usr/lib 中,我不需要任何 -L 选项)。

关于c++ - 我要链接什么来定义 boost::thread_specific_ptr 和相关的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6025113/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com