DocumentProvider
我在我的objective-c项目中使用Boost C ++库。我按照这条指令为Xcode添加了提升:
http://freddy.cellcore.org/post/79587278354/boost-c-libraries-on-osx-xcode-5
添加boost.framework后,我可以不加错误地包含标题。
Undefined symbols for architecture x86_64:
"boost::serialization::typeid_system::extended_type_info_typeid_0::type_register (std::type_info const&)", referenced from:
boost::serialization::extended_type_info_typeid<std::__1::pair<long long const, long long> >::extended_type_info_typeid() in TestC.o
boost::serialization::extended_type_info_typeid<std::__1::map<long long, long long, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, long long> > > >::extended_type_info_typeid() in TestC.o
"boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister()", referenced from:
boost::serialization::extended_type_info_typeid<std::__1::pair<long long const, long long> >::~extended_type_info_typeid() in TestC.o
boost::serialization::extended_type_info_typeid<std::__1::map<long long, long long, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, long long> > > >::~extended_type_info_typeid() in TestC.o
"boost::serialization::typeid_system::extended_type_info_typeid_0::extended_type_info_typeid_0(char const*)", referenced from:
boost::serialization::extended_type_info_typeid<std::__1::pair<long long const, long long> >::extended_type_info_typeid() in TestC.o
boost::serialization::extended_type_info_typeid<std::__1::map<long long, long long, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, long long> > > >::extended_type_info_typeid() in TestC.o
"boost::serialization::typeid_system::extended_type_info_typeid_0::~extended_type_info_typeid_0()", referenced from:
boost::serialization::extended_type_info_typeid<std::__1::pair<long long const, long long> >::~extended_type_info_typeid() in TestC.o
boost::serialization::extended_type_info_typeid<std::__1::pair<long long const, long long> >::extended_type_info_typeid() in TestC.o
boost::serialization::extended_type_info_typeid<std::__1::map<long long, long long, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, long long> > > >::~extended_type_info_typeid() in TestC.o
boost::serialization::extended_type_info_typeid<std::__1::map<long long, long long, std::__1::less<long long>, std::__1::allocator<std::__1::pair<long long const, long long> > > >::extended_type_info_typeid() in TestC.o
但是当我添加一些代码行时,按下build,它会显示上面的错误。
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/serialization/map.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
我该如何解决这个问题?
答案 0 :(得分:1)
我无法访问该Github页面,但我猜你只有x86版本,而不是x64版本。
来自剧本:
# To configure the script, define:
# BOOST_LIBS: which libraries to build
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 5.1)
#
# Then go get the source tar.bz of the boost you want to build, shove it in the
# same directory as this script, and run "./boost.sh".
或者您可以尝试使用此版本?它是预编译的...... https://github.com/danoli3/ofxiOSBoost