【发布时间】:2016-05-12 10:56:12
【问题描述】:
我正在使用 Google Analytics,当我运行 pod 安装后,会显示这些错误。我不明白为什么;项目也有 Crashlytics 框架,但这些错误只有在添加 Google Analytics 后才会显示。
Undefined symbols for architecture x86_64:
"std::get_terminate()", referenced from:
_CLSExceptionCheckHandlers in Crashlytics(CLSException.o)
"std::set_terminate(void (*)())", referenced from:
_CLSExceptionInitialize in Crashlytics(CLSException.o)
CLSTerminateHandler() in Crashlytics(CLSException.o)
"std::terminate()", referenced from:
___clang_call_terminate in Crashlytics(CLSException.o)
"typeinfo for char const*", referenced from:
_CLSExceptionRaiseTestCppException in Crashlytics(CLSException.o)
GCC_except_table1 in Crashlytics(CLSException.o)
"typeinfo for std::exception", referenced from:
GCC_except_table1 in Crashlytics(CLSException.o)
typeinfo for std::exception const* in Crashlytics(CLSException.o)
"vtable for __cxxabiv1::__class_type_info", referenced from:
typeinfo for std::__1::__basic_string_common<true> in Crashlytics(CLSException.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for __cxxabiv1::__pointer_type_info", referenced from:
typeinfo for std::exception const* in Crashlytics(CLSException.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
typeinfo for std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > in Crashlytics(CLSException.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"___cxa_allocate_exception", referenced from:
_CLSExceptionRaiseTestCppException in Crashlytics(CLSException.o)
"___cxa_begin_catch", referenced from:
CLSTerminateHandler() in Crashlytics(CLSException.o)
___clang_call_terminate in Crashlytics(CLSException.o)
"___cxa_current_exception_type", referenced from:
CLSTerminateHandler() in Crashlytics(CLSException.o)
"___cxa_demangle", referenced from:
+[CLSDemangleOperation demangleCppSymbol:] in Crashlytics(CLSDemangleOperation.o)
"___cxa_end_catch", referenced from:
CLSTerminateHandler() in Crashlytics(CLSException.o)
"___cxa_rethrow", referenced from:
CLSTerminateHandler() in Crashlytics(CLSException.o)
"___cxa_throw", referenced from:
_CLSExceptionRaiseTestCppException in Crashlytics(CLSException.o)
"___gxx_personality_v0", referenced from:
+[CLSDemangleOperation demangleBlockInvokeCppSymbol:] in Crashlytics(CLSDemangleOperation.o)
+[CLSDemangleOperation demangleSwiftSymbol:] in Crashlytics(CLSDemangleOperation.o)
-[CLSDemangleOperation main] in Crashlytics(CLSDemangleOperation.o)
___28-[CLSDemangleOperation main]_block_invoke in Crashlytics(CLSDemangleOperation.o)
Dwarf Exception Unwind Info (__eh_frame) in Crashlytics(CLSDemangleOperation.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
【问题讨论】:
-
你能展示你的 pod 文件吗?以及您的部署目标的版本?
-
几乎可以肯定两个可用的 C++ 运行时库(
libstdc++和libc++)存在问题。所有代码都需要针对同一个运行时库进行编译,这肯定是libc++。您也可能没有链接到 any C++ 运行时库。
标签: objective-c xcode crashlytics