Realm 1.0.1 iOS obj-c 编译错误

Realm 1.0.1 iOS obj-c compilation error

我将 iOS Obj-C 的领域从 0.98 更新到 1.0.1 但现在我们在编译过程中遇到了这些错误:

undef: __ZN5realm4util23PlatformSpecificCondVarC1Ev undef: __ZN5realm4util23PlatformSpecificCondVarD1Ev undef: __ZNK5realm13TableViewBase16maximum_datetimeEmPm undef: __ZNK5realm5Table16maximum_datetimeEmPm undef: __ZNK5realm11StringIndex3getEmRNSt3__15arrayIcLm8EEE undef: __ZN5realm5Table12set_datetimeEmmNS_8DateTimeE undef: __ZN5realm9Allocator10do_reallocEmPKcmm undef: __ZNK5realm5Table16minimum_datetimeEmPm undef: __ZN5realm5QueryC1ERKNS_5TableERKNS_4util8bind_ptrINS_8LinkViewEEE undef: __ZNK5realm13TableViewBase16minimum_datetimeEmPm undef: __ZNK5realm5Table12get_datetimeEmm undef: __ZN5realm14LinkListColumn19unregister_linkviewERKNS_8LinkViewE Undefined symbols for architecture x86_64:
"realm::util::PlatformSpecificCondVar::PlatformSpecificCondVar()", referenced from: realm::SharedGroup::SharedGroup(realm::Replication&, realm::SharedGroup::DurabilityLevel, char const*, bool) in libRealm.a(shared_realm.o)
"realm::util::PlatformSpecificCondVar::~PlatformSpecificCondVar()", referenced from: realm::SharedGroup::SharedGroup(realm::Replication&, realm::SharedGroup::DurabilityLevel, char const*, bool) in libRealm.a(shared_realm.o)
"realm::TableViewBase::maximum_datetime(unsigned long, unsigned long*) const", referenced from: auto realm::Results::max(unsigned long)::$_3::operator()(realm::TableView const&) const in libRealm.a(results.o)
"realm::Table::maximum_datetime(unsigned long, unsigned long*) const", referenced from: auto realm::Results::max(unsigned long)::$_3::operator()(realm::Table const&) const in libRealm.a(results.o) "realm::StringIndex::get(unsigned long, std::__1::array&) const", referenced from: void realm::StringIndex::set(unsigned long, realm::null) in libRealm.a(RLMArray.o) void realm::StringIndex::erase(unsigned long, bool) in libRealm.a(RLMArray.o) void realm::StringIndex::erase(unsigned long, bool) in libRealm.a(RLMArray.o) void realm::StringIndex::erase(unsigned long, bool) in libRealm.a(RLMArray.o) void realm::StringIndex::set(unsigned long, long long) in libRealm.a(RLMQueryUtil.o)
"realm::Table::set_datetime(unsigned long, unsigned long, realm::DateTime)", referenced from: realm::RowFuncs >::set_datetime(unsigned long, realm::DateTime) in libRealm.a(RLMAccessor.o) copy_property_values(realm::Property const&, realm::Property const&, realm::Table&) in libRealm.a(object_store.o)
"realm::Allocator::do_realloc(unsigned long, char const*, unsigned long, unsigned long)", referenced from: vtable for realm::Allocator in libRealm.a(RLMArray.o) "realm::Table::minimum_datetime(unsigned long, unsigned long*) const", referenced from: auto realm::Results::min(unsigned long)::$_7::operator()(realm::Table const&) const in libRealm.a(results.o) "realm::Query::Query(realm::Table const&, realm::util::bind_ptr const&)", referenced from: realm::Table::where(realm::util::bind_ptr const&) in libRealm.a(RLMArrayLinkView.o)
"realm::TableViewBase::minimum_datetime(unsigned long, unsigned long*) const", referenced from: auto realm::Results::min(unsigned long)::$_7::operator()(realm::TableView const&) const in libRealm.a(results.o) "realm::Table::get_datetime(unsigned long, unsigned long) const", referenced from: realm::RowFuncs >::get_datetime(unsigned long) const in libRealm.a(RLMAccessor.o) copy_property_values(realm::Property const&, realm::Property const&, realm::Table&) in libRealm.a(object_store.o)
"realm::LinkListColumn::unregister_linkview(realm::LinkView const&)", referenced from: realm::LinkView::~LinkView() in libRealm.a(RLMArray.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

我正在使用 cocoapods 来安装它。谢谢!

我最终将 cocoapods 降级到 0.39.0 并做到了

rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
pod install

目前有效。