与metaio相关的mach-o链接器错误

时间:2013-12-19 16:01:32

标签: 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)

4 个答案:

答案 0 :(得分:4)

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

enter image description here

link也可以为您提供帮助。

新更新:

检查完代码后,我在您的项目中发现了一些问题,您错过了StoreKit and StoreKitUI and MeidaPlayer框架。

您的部分构建设置配置不正确。请使用此图片中显示的确切配置。 Other Linker flag必须是这样的:

enter image description here

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

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

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

答案 1 :(得分:3)

EKEventEditViewController表示您没有链接到EventKitUI.framework。

SLComposeViewController表示您没有链接到Social.framework

参考Here

答案 2 :(得分:0)

我通过更新sdk解决了所有错误,我遇到了很多问题(这里:http://helpdesk.metaio.com/questions/38835/ios81-unity-455-metaio-60-sdk-mach-o-linker-errors-in-xcode-61

答案 3 :(得分:0)

使用以下配置绑定它:

<强>框架: Imported Frameworks

添加链接器标记: File config

将ViewController扩展名更改为.mm: mm extension

内部构建设置将语言C ++设置如下: Language C++ Settings

并设置C语言方言: C Language Dialect

同时

检查所有框架是否正确链接

检查您需要的所有文件是否已注册到&#34;构建阶段&gt;编译来源&#34;

在iOS 8上测试