mach-o linker errors with metaio

2.3k views Asked by At

I am working with Metaio SDK and cloud plugin and I can not get past a huge collection of mach-o linker errors in xcode 5. Here are a few, but I have 118 of them:

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)

After setting deployment target to 6.0, I have cut this down to 6 errors

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

There are 4 answers

12
Shabir jan On BEST ANSWER

The error you shown for iOS 6 means, that some of the frameworks are missing, Please add all these frameworks shown in the image to make it work with iOS 6.

enter image description here

and this link can help you as well.

New Update:

After checking your code, i found some problems in the your project, You were missing the StoreKit and StoreKitUI and MeidaPlayer Frameworks.

And some of your build setting configuration was not correct. Please use the exact configurations show in this images. Other Linker flag must be like that:

enter image description here

and C Language dialect must be like that: enter image description here

and this configuration be exactly like this image: enter image description here

i have tested the your app by using all these configuration and now the app is working fine with iOS7 and iOS 6.

0
Balakrishnan Mca On

EKEventEditViewController indicates that you are not linking against EventKitUI.framework.

SLComposeViewController indicates that you are not linking against Social.framework

Refer Here

0
dianakarenms On

Nailed it with these configurations:

Frameworks: Imported Frameworks

Add linker Flag: File config

Change ViewController extension to .mm: mm extension

Inside Build Settings set Language C++ as follows: Language C++ Settings

And set the C Language Dialect: C Language Dialect

Also:

Check all the frameworks are linked correctly

Check that all the files you need are registered inside "Build Phases > Compile Sources"

Tested on iOS 8

0
Ahmed U3 On

I fixed all my errors by updating the sdk, I faced tons of problems (here: http://helpdesk.metaio.com/questions/38835/ios81-unity-455-metaio-60-sdk-mach-o-linker-errors-in-xcode-61)