Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c “Crashlytics错误”;架构x86“U 64”的未定义符号;吊舱安装期间_Objective C_Xcode_Crashlytics - Fatal编程技术网

Objective c “Crashlytics错误”;架构x86“U 64”的未定义符号;吊舱安装期间

Objective c “Crashlytics错误”;架构x86“U 64”的未定义符号;吊舱安装期间,objective-c,xcode,crashlytics,Objective C,Xcode,Crashlytics,我正在使用Google Analytics,当我运行pod安装后,会显示这些错误。我不明白为什么;该项目也有Crashlytics框架,但这些错误只有在添加Google分析后才会显示 Undefined symbols for architecture x86_64: "std::get_terminate()", referenced from: _CLSExceptionCheckHandlers in Crashlytics(CLSException.o) "std::set_t

我正在使用Google Analytics,当我运行pod安装后,会显示这些错误。我不明白为什么;该项目也有Crashlytics框架,但这些错误只有在添加Google分析后才会显示

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)
架构x86_64的未定义符号: “std::get_terminate()”,引用自: _Crashlytics中的CLSException检查句柄(CLSException.o) “std::set_terminate(void(*)())”,引用自: _CLSException在Crashlytics中初始化(CLSException.o) Crashlytics(CLSException.o)中的CLSTerminateHandler() “std::terminate()”,引用自: ___clang_call_在Crashlytics中终止(CLSException.o) “字符常量的类型信息*”,引用自: _Crashlytics中的CLSException RaiseTestCppException(CLSException.o) GCC除了Crashlytics中的表1(CLSException.o) “std::exception的类型信息”,引用自: GCC除了Crashlytics中的表1(CLSException.o) Crashlytics(CLSException.o)中std::exception const*的类型信息 “vtable for _cxxabiv1::_class_type_info”,引用自: std的typeinfo::\uuuu 1::\uuuu基本\uu字符串\u在Crashlytics(CLSException.o)中常见 注意:缺少vtable通常意味着第一个非内联虚拟成员函数没有定义。 “vtable for _cxxabiv1::_指针_类型_信息”,引用自: Crashlytics(CLSException.o)中std::exception const*的类型信息 注意:缺少vtable通常意味着第一个非内联虚拟成员函数没有定义。 “vtable for _cxxabiv1::_vmi_class_type_info”,引用自: Crashlytics(CLSException.o)中std::_1::basic_字符串的类型信息 注意:缺少vtable通常意味着第一个非内联虚拟成员函数没有定义。 “\uuuuuuuucxa\u分配\u异常”,引用自: _Crashlytics中的CLSException RaiseTestCppException(CLSException.o) “\uuuuuuuucxa\u begin\u catch”,引用自: Crashlytics(CLSException.o)中的CLSTerminateHandler() ___clang_call_在Crashlytics中终止(CLSException.o) “当前异常类型”,引用自: Crashlytics(CLSException.o)中的CLSTerminateHandler() “\uuuuuuuuucxa\u demangle”,引用自: +Crashlytics(CLSDemangleOperation.o)中的[CLSDemangleOperation demangleCppSymbol:] “\uuuuuuuucxa\u end\u catch”,引用自: Crashlytics(CLSException.o)中的CLSTerminateHandler() “\uuuuuuucxa\u rethrow”,引用自: Crashlytics(CLSException.o)中的CLSTerminateHandler() “\uuuuuuuucxa\u throw”,引用自: _Crashlytics中的CLSException RaiseTestCppException(CLSException.o) “\uuuuuuugxx\u个性\u v0”,引用自: +Crashlytics(CLSDemangleOperation.o)中的[CLSDemangleOperation demangleBlockInvokeCppSymbol:] +[CLSDemangleOperation demangleSwiftSymbol:]在Crashlytics中(CLSDemangleOperation.o) -Crashlytics(CLSDemangleOperation.o)中的[CLSDemangleOperation main] ___28-[CLSDemangleOperation main]\u块\u在Crashlytics中调用(CLSDemangleOperation.o) Crashlytics(CLSDemangleOperation.o)中的矮人异常展开信息(uu eh_frame) ld:找不到架构x86_64的符号 叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用)
对于我来说,在为基于cordova的应用程序集成此应用程序时,我遇到了类似的问题

您看到的特定错误是因为没有链接libc++。Crashlytics 3.0需要libc++(不是libstdc++)、libz、SystemConfiguration.framework和Security.framework。链接应该由SDK中的模块定义自动处理。如果您不使用模块,我们的引导安装应该插入链接所需的库。在这种情况下,这显然不起作用

解决方案1:开始使用模块。它们缩短了构建时间,使与swift的互操作性成为可能,并且通常非常有用

解决方案2:手动链接libc++、libz、SystemConfiguration.framework和Security.framework。 解决方案#2-为我工作
这个答案是mattie在Xcode中给出的Santosh的答案对我来说不起作用,但我只是将.m文件改为.mm文件

下面是.mm和.m之间的区别

对于“普通”的Objective-C,使用.mm超过.m的主要缺点是Objective-C++的编译时间要高得多。这是因为C++编译器比C编译器长。使用Xcode 3.2及更高版本,Objective-C代码可以使用Clang前端工具链显著加快Objective-C/C编译时间。由于Clang还不支持Objective-C++/C++,这进一步扩大了两者在编译时间上的差距

更好的策略是默认使用.m。如果在以后的开发中需要使用Objective-C++,那么将文件重命名为使用.mm扩展名是没有坏处的。如果您在XCode中这样做,项目将自动更新以使用新命名的文件

当然,一旦您尝试在运行时比较Objective-C++和Objective-C的性能,所有的标准警告都适用。ObjultC++是一个C++超集,ObjuleC是C超集,所以在处理时,你处理两种不同的语言,每种语言都有性能权衡。考虑到你使用ObjtoX,你可能编写一个用户级的应用程序(不是系统级的应用程序),C和C++之间的性能差异可能完全取决于你在每个语言中编写高效算法的能力。如果你是C++开发人员,你可能会比C语言更好,反之亦然。因此,像往常一样,为工作使用适当的工具

参考文献中,您可能也对这个答案感兴趣:对于Vix/P>,C VS C++(ObjuleC和Voice -C++) 从Xcode 4.0(使用LLVM 3.0)开始更新2012年2月17日,Clang支持Objective-C++。即使是C++11支持现在也相当强大


()

你能出示你的pod文件吗?和部署目标的版本?几乎可以肯定的是,两个C++运行时库是可用的(<代码> LBSTDC++< /COD>和 LBC++)。A.