0
boost::atomics::detail::lockpool::get_lock_for(void const volatile*)", referenced from:
boost::thread_detail::enter_once_region(boost::once_flag&) in libboost_thread-mt.a(once.o)
boost::thread_detail::commit_once_region(boost::once_flag&) in libboost_thread-mt.a(once.o)
boost::thread_detail::rollback_once_region(boost::once_flag&) in libboost_thread-mt.a(once.o)
ld: symbol(s) not found for architecture x86_64
我正在運行OS X版本10.9。架構x86_64的未定義符號 - 在libboost_thread-mt.a中
使用下列選項安裝升壓:
須藤端口安裝升壓+萬向
$ ar -tv libboost_thread-mt.a
rw-r--r-- 502/501 21776 Dec 1 22:44 2013 __.SYMDEF
rw-r--r-- 502/80 925520 Dec 1 22:44 2013 thread.o
rw-r--r-- 502/80 18248 Dec 1 22:44 2013 once.o
rw-r--r-- 502/80 51216 Dec 1 22:44 2013 future.o
$ nm -a once.o
0000000000003168 s EH_frame0
0000000000003080 s GCC_except_table0
00000000000030cc s GCC_except_table1
0000000000003118 s GCC_except_table2
U __Unwind_Resume
0000000000000000 T __ZN5boost13thread_detail17enter_once_regionERNS_9once_flagE
0000000000003188 S __ZN5boost13thread_detail17enter_once_regionERNS_9once_flagE.eh
0000000000000130 T __ZN5boost13thread_detail18commit_once_regionERNS_9once_flagE
00000000000031c0 S __ZN5boost13thread_detail18commit_once_regionERNS_9once_flagE.eh
00000000000001a0 T __ZN5boost13thread_detail20rollback_once_regionERNS_9once_flagE
00000000000031f0 S __ZN5boost13thread_detail20rollback_once_regionERNS_9once_flagE.eh
0000000000003010 d __ZN5boost13thread_detailL10once_mutexE
0000000000003050 d __ZN5boost13thread_detailL7once_cvE
U __ZN5boost7atomics6detail8lockpool12get_lock_forEPVKv
U __ZSt9terminatev
U ___gxx_personality_v0
U _pthread_cond_broadcast
U _pthread_cond_wait
U _pthread_mutex_lock
U _pthread_mutex_unlock
可以注意到行 「U __ZN5boost7atomics6detail8lockpool12get_lock_forEPVKv」 未定義
指示get_lock_for。這是造成這個問題的原因。
如何擺脫這個錯誤。任何建議?
boost_atomic不存在,應該是-lboost_thread。 – Pin
你生活在過去,我的朋友:http://www.boost.org/doc/libs/1_55_0/doc/html/atomic.html – oakad
我的歉意,以爲它是隻有標題:$ – Pin