热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

iOS--错误集锦--"vtablefor__cxxabiv1::__si_class_type_info",referencedfrom:

错误日志Undefinedsymbolsforarchitecturearm64:"vtablefor__cxxabiv1::__si_class_type_info&quo

错误日志

Undefined symbols for architecture arm64:

  "vtable for __cxxabiv1::__si_class_type_info", referenced from:

      typeinfo for Kernel in libTalkingData.a(svm.o)

      typeinfo for Solver_NU in libTalkingData.a(svm.o)

  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

  "___cxa_pure_virtual", referenced from:

      vtable for Kernel in libTalkingData.a(svm.o)

  "vtable for __cxxabiv1::__class_type_info", referenced from:

      typeinfo for QMatrix in libTalkingData.a(svm.o)

      typeinfo for Solver in libTalkingData.a(svm.o)

  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

  "operator delete(void*)", referenced from:

      Kernel::~Kernel() in libTalkingData.a(svm.o)

      Solver::~Solver() in libTalkingData.a(svm.o)

      Solver_NU::~Solver_NU() in libTalkingData.a(svm.o)

  "operator delete[](void*)", referenced from:

      Kernel::~Kernel() in libTalkingData.a(svm.o)

      Solver::Solve(int, QMatrix const&, double const*, signed char const*, double*, double, double, double, Solver::SolutionInfo*, int) in libTalkingData.a(svm.o)

  "operator new[](unsigned long)", referenced from:

      Kernel::Kernel(int, svm_node* const*, svm_parameter const&) in libTalkingData.a(svm.o)

      Solver::Solve(int, QMatrix const&, double const*, signed char const*, double*, double, double, double, Solver::SolutionInfo*, int) in libTalkingData.a(svm.o)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)



解决方案: 静态库中采用ObjectC++实现,遇到这样的问题看看是不是配置不对,需要保证工程中至少有一个.mm后缀的源文件,或在工程属性中指定编译方式。修改方式如下: 可以将任意一个.m后缀的文件改名为.mm 2 在Xcode的 Target -> Build Settings -> Apple LLVM 8.0 - Language -> Compile Sources As修改为"Objective-C++




推荐阅读
author-avatar
萝莉控的许123321
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有