我想端口的現有項目到iPhone這就需要Boost.Thread
庫,項目編譯沒有錯誤,但也有鏈接錯誤:如何將boost線程庫添加到iPhone項目中?
"boost::thread::start_thread()", referenced from:
boost::thread::thread<(anonymous namespace)::ReadThread::Function>((anonymous namespace)::ReadThread::Function, boost::disable_if<boost::is_convertible<(anonymous namespace)::ReadThread::Function&, boost::detail::thread_move_t<(anonymous namespace)::ReadThread::Function> >, boost::thread::dummy*>::type)in ChessEngine.o
我怎麼能要求的線程庫添加到Xcode項目?
p.s.升壓庫在:/usr/local/lib/libboost_thread-mt.a
EDIT(庫中找到,但得到的架構錯誤):
繼Linking to Boost.Signals using Xcode,在Other Linker Flags
將在Library Search Path
/usr/local/lib
和-lboost_thread-mt
後,該庫中找到。不過,也有新的錯誤和警告:
ld: warning: in /usr/local/lib/libboost_thread-mt.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
怎樣纔可以有針對iOS(4.0或更高版本)的lib工作?謝謝!