ios - metaio 的 mach-o 链接器错误

标签 ios xcode linker linker-errors mach-o

我正在使用 Metaio SDK 和云插件,我无法通过 xcode 5 中的大量 mach-o 链接器错误。这里有一些,但我有 118 个:

Undefined symbols for architecture armv7s:
  "std::__throw_logic_error(char const*)", referenced from:
      tesseract::WordListLangModel::AddString32(int const*) in metaioSDK(word_list_lang_model.o)
      std::basic_string<int, std::char_traits<int>, std::allocator<int> >::basic_string(std::basic_string<int, std::char_traits<int>, std::allocator<int> > const&, unsigned long, unsigned long) in metaioSDK(word_list_lang_model.o)
      tesseract::ConvNetCharKSBmHGiVwS::Fold() in metaioSDK(conv_net_classifier.o)
      tesseract::HybridNeuralNetCharKSBmHGiVwS::Fold() in metaioSDK(hybrid_neural_net_classifier.o)
  "std::string::operator[](unsigned long) const", referenced from:
      tesseract::CubeUtils::SplitStringUsing(std::string const&, std::string const&, std::vector<std::string, std::allocator<std::string> >*) in metaioSDK(cube_utils.o)
  "std::string::find_first_of(std::string const&, unsigned long) const", referenced from:
      tesseract::CubeUtils::SplitStringUsing(std::string const&, std::string const&, std::vector<std::string, std::allocator<std::string> >*) in metaioSDK(cube_utils.o)
  "std::string::length() const", referenced from:
      tesseract::WordUnigrams::Create(std::string const&, std::string const&) in metaioSDK(word_unigrams.o)
      tesseract::TesseractCubeCombiner::ComputeCombinerFeatures(std::string const&, int, tesseract::CubeObject*, tesseract::WordAltList*, std::vector<double, std::allocator<double> >*, bool*) in metaioSDK(tesseract_cube_combiner.o)
      tesseract::ConvNetCharKSBmHGiVwS::LoadFoldingSets(std::string const&, std::string const&, tesseract::LangModel*) in metaioSDK(conv_net_classifier.o)
      tesseract::HybridNeuralNetCharKSBmHGiVwS::LoadFoldingSets(std::string const&, std::string const&, tesseract::LangModel*) in metaioSDK(hybrid_neural_net_classifier.o)

将部署目标设置为 6.0 后,我将其减少到 6 个错误
Undefined symbols for architecture armv7s:
  "_OBJC_CLASS_$_EKEventEditViewController", referenced from:
      objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
  "_OBJC_CLASS_$_EKEvent", referenced from:
      objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
  "_OBJC_METACLASS_$_MPMoviePlayerViewController", referenced from:
      _OBJC_METACLASS_$_ASMoviePlayerViewController in metaioSDK(ASMoviePlayerViewController.o)
      _OBJC_METACLASS_$_MoviePlayerViewController in metaioSDK(MoviePlayerViewController.o)
  "_OBJC_CLASS_$_EKEventStore", referenced from:
      objc-class-ref in metaioSDK(XDtLkdmsHtXjGTCxiIGVbMqenrFYqNevtLOSg)
  "_OBJC_CLASS_$_MPMoviePlayerViewController", referenced from:
      _OBJC_CLASS_$_ASMoviePlayerViewController in metaioSDK(ASMoviePlayerViewController.o)
      _OBJC_CLASS_$_MoviePlayerViewController in metaioSDK(MoviePlayerViewController.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

您为 iOS 6 显示的错误意味着缺少某些框架,请添加图像中显示的所有这些框架以使其适用于 iOS 6。

enter image description here

这个link也可以帮助你。

新更新:

检查您的代码后,我发现您的项目中存在一些问题,您缺少 StoreKit and StoreKitUI and MeidaPlayer构架。

并且您的某些build设置配置不正确。请使用此图像中显示的确切配置。 Other Linker flag必须是这样的:

enter image description here

C Language dialect必须是这样的:
enter image description here

并且此配置与此图像完全相同:
enter image description here

我已经使用所有这些配置测试了您的应用程序,现在该应用程序在 iOS7 和 iOS 6 上运行良好。

关于ios - metaio 的 mach-o 链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20686213/

相关文章:

c++ - 危险的重定位错误是什么意思?

iOS:在 UITableViewCintroller 子类中创建默认静态表

xcode - 没有这样的模块 "CreateMLUI"

xcode - 如何在 Xcode 9.2 和 iPhone XS max 中添加模拟器 iPhone XS

linux - 检测到程序和库构建版本不匹配

assembly - 谁负责符号引用链接器或加载器

ios - 标题上方有/没有图像的可调整大小的 UIButton?

ios - 写入文件 : How to write multiple data in a csv (or any) file?

iOS 应用内购买 : multiple accounts

iphone - 使用 NSMutableArray 的内容覆盖 plist 文件(plist 中的第一项始终为 NULL)