Intel TBB编译错误ld returend 1退出状态

问题描述 投票:0回答:0

g++ -ltbb program.cpp

编译程序

错误:

/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::wait_context::add_reference(long)':
new.cpp:(.text._ZN3tbb6detail2d112wait_context13add_referenceEl[_ZN3tbb6detail2d112wait_context13add_referenceEl]+0x70): undefined reference to `tbb::detail::r1::notify_waiters(unsigned long)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::execution_slot(tbb::detail::d1::execution_data const&)':
new.cpp:(.text._ZN3tbb6detail2d114execution_slotERKNS1_14execution_dataE[_ZN3tbb6detail2d114execution_slotERKNS1_14execution_dataE]+0x18): undefined reference to `tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::spawn(tbb::detail::d1::task&, tbb::detail::d1::task_group_context&)':
new.cpp:(.text._ZN3tbb6detail2d15spawnERNS1_4taskERNS1_18task_group_contextE[_ZN3tbb6detail2d15spawnERNS1_4taskERNS1_18task_group_contextE]+0x34): undefined reference to `tbb::detail::r1::spawn(tbb::detail::d1::task&, tbb::detail::d1::task_group_context&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::wait(tbb::detail::d1::wait_context&, tbb::detail::d1::task_group_context&)':
new.cpp:(.text._ZN3tbb6detail2d14waitERNS1_12wait_contextERNS1_18task_group_contextE[_ZN3tbb6detail2d14waitERNS1_12wait_contextERNS1_18task_group_contextE]+0x23): undefined reference to `tbb::detail::r1::wait(tbb::detail::d1::wait_context&, tbb::detail::d1::task_group_context&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_arena::initialize()::{lambda()#1}::operator()() const':
new.cpp:(.text._ZZN3tbb6detail2d110task_arena10initializeEvENKUlvE_clEv[_ZZN3tbb6detail2d110task_arena10initializeEvENKUlvE_clEv]+0x1b): undefined reference to `tbb::detail::r1::initialize(tbb::detail::d1::task_arena_base&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_arena::terminate()':
new.cpp:(.text._ZN3tbb6detail2d110task_arena9terminateEv[_ZN3tbb6detail2d110task_arena9terminateEv]+0x28): undefined reference to `tbb::detail::r1::terminate(tbb::detail::d1::task_arena_base&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::current_thread_index()':
new.cpp:(.text._ZN3tbb6detail2d120current_thread_indexEv[_ZN3tbb6detail2d120current_thread_indexEv]+0x12): undefined reference to `tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_group_context::task_group_context(tbb::detail::d1::task_group_context::context_traits, tbb::detail::d0::string_resource_index)':
new.cpp:(.text._ZN3tbb6detail2d118task_group_contextC2ENS2_14context_traitsENS0_2d021string_resource_indexE[_ZN3tbb6detail2d118task_group_contextC5ENS2_14context_traitsENS0_2d021string_resource_indexE]+0x4f): undefined reference to `tbb::detail::r1::initialize(tbb::detail::d1::task_group_context&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_group_context::~task_group_context()':
new.cpp:(.text._ZN3tbb6detail2d118task_group_contextD2Ev[_ZN3tbb6detail2d118task_group_contextD5Ev]+0x18): undefined reference to `tbb::detail::r1::destroy(tbb::detail::d1::task_group_context&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_group_context::reset()':
new.cpp:(.text._ZN3tbb6detail2d118task_group_context5resetEv[_ZN3tbb6detail2d118task_group_context5resetEv]+0x20): undefined reference to `tbb::detail::r1::reset(tbb::detail::d1::task_group_context&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_group_context::cancel_group_execution()':
new.cpp:(.text._ZN3tbb6detail2d118task_group_context22cancel_group_executionEv[_ZN3tbb6detail2d118task_group_context22cancel_group_executionEv]+0x20): undefined reference to `tbb::detail::r1::cancel_group_execution(tbb::detail::d1::task_group_context&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_group_context::is_group_execution_cancelled()':
new.cpp:(.text._ZN3tbb6detail2d118task_group_context28is_group_execution_cancelledEv[_ZN3tbb6detail2d118task_group_context28is_group_execution_cancelledEv]+0x20): undefined reference to `tbb::detail::r1::is_group_execution_cancelled(tbb::detail::d1::task_group_context&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::task_group_base::~task_group_base()':
new.cpp:(.text._ZN3tbb6detail2d115task_group_baseD2Ev[_ZN3tbb6detail2d115task_group_baseD5Ev]+0x84): undefined reference to `tbb::detail::r1::throw_exception(tbb::detail::d0::exception_id)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::graph::~graph()':
new.cpp:(.text._ZN3tbb6detail2d15graphD2Ev[_ZN3tbb6detail2d15graphD5Ev]+0x53): undefined reference to `tbb::detail::r1::cache_aligned_deallocate(void*)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `void tbb::detail::d1::small_object_allocator::deallocate<tbb::detail::d1::graph_task>(tbb::detail::d1::graph_task*, tbb::detail::d1::execution_data const&)':
new.cpp:(.text._ZN3tbb6detail2d122small_object_allocator10deallocateINS1_10graph_taskEEEvPT_RKNS1_14execution_dataE[_ZN3tbb6detail2d122small_object_allocator10deallocateINS1_10graph_taskEEEvPT_RKNS1_14execution_dataE]+0x44): undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `void tbb::detail::d1::task_arena::execute_impl<void, tbb::detail::d1::graph::wait_for_all()::{lambda()#1}::operator()() const::{lambda()#1}>(tbb::detail::d1::graph::wait_for_all()::{lambda()#1}::operator()() const::{lambda()#1}&)':
new.cpp:(.text._ZN3tbb6detail2d110task_arena12execute_implIvZZNS1_5graph12wait_for_allEvENKUlvE_clEvEUlvE_EET_RT0_[_ZN3tbb6detail2d110task_arena12execute_implIvZZNS1_5graph12wait_for_allEvENKUlvE_clEvEUlvE_EET_RT0_]+0x52): undefined reference to `tbb::detail::r1::execute(tbb::detail::d1::task_arena_base&, tbb::detail::d1::delegate_base&)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::function_task<HelloWorld>* tbb::detail::d1::small_object_allocator::new_object<tbb::detail::d1::function_task<HelloWorld>, HelloWorld, tbb::detail::d1::wait_context&, tbb::detail::d1::small_object_allocator&>(HelloWorld&&, tbb::detail::d1::wait_context&, tbb::detail::d1::small_object_allocator&)':
new.cpp:(.text._ZN3tbb6detail2d122small_object_allocator10new_objectINS1_13function_taskI10HelloWorldEEJS5_RNS1_12wait_contextERS2_EEEPT_DpOT0_[_ZN3tbb6detail2d122small_object_allocator10new_objectINS1_13function_taskI10HelloWorldEEJS5_RNS1_12wait_contextERS2_EEEPT_DpOT0_]+0x30): undefined reference to `tbb::detail::r1::allocate(tbb::detail::d1::small_object_pool*&, unsigned long)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `tbb::detail::d1::cache_aligned_allocator<tbb::detail::d1::graph_task*>::deallocate(tbb::detail::d1::graph_task**, unsigned long)':
new.cpp:(.text._ZN3tbb6detail2d123cache_aligned_allocatorIPNS1_10graph_taskEE10deallocateEPS4_m[_ZN3tbb6detail2d123cache_aligned_allocatorIPNS1_10graph_taskEE10deallocateEPS4_m]+0x20): undefined reference to `tbb::detail::r1::cache_aligned_deallocate(void*)'
/usr/bin/ld: /tmp/cc3SwaZD.o: in function `void tbb::detail::d1::small_object_allocator::deallocate<tbb::detail::d1::function_task<HelloWorld> >(tbb::detail::d1::function_task<HelloWorld>*, tbb::detail::d1::execution_data const&)':
new.cpp:(.text._ZN3tbb6detail2d122small_object_allocator10deallocateINS1_13function_taskI10HelloWorldEEEEvPT_RKNS1_14execution_dataE[_ZN3tbb6detail2d122small_object_allocator10deallocateINS1_13function_taskI10HelloWorldEEEEvPT_RKNS1_14execution_dataE]+0x44): undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'
collect2: error: ld returned 1 exit status

编译了一个intel tbb程序遇到这个错误在所有程序中也遇到

linux terminal g++ intel tbb
© www.soinside.com 2019 - 2024. All rights reserved.