Xcode Realm - Undefined symbols std::bad_alloc

Viewed 197

Cartfile:

github "realm/realm-cocoa" ~> 10.20.0

Carthage version:

0.38.0

Installing by:

carthage update --use-xcframeworks --platform iOS --verbose

Installing Realm gives this error on build:

Undefined symbols for architecture x86_64:
 "std::bad_alloc::~bad_alloc()", referenced from:
   realm::keychain::(anonymous namespace)::set_key(std::__1::vector<char, std::__1::allocator<char> > const&, __CFString const*, __CFString const*) in Realm(keychain_helper.o)
   realm::keychain::(anonymous namespace)::build_search_dictionary(__CFString const*, __CFString const*, realm::util::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >) in Realm(keychain_helper.o)
1 Answers

These undefined symbols are from other libraries. Including libc++.tbl and libz.tbl solved the issue.

Related