我正在使用 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。
这个link也可以帮助你。
新更新:
检查您的代码后,我发现您的项目中存在一些问题,您缺少 StoreKit and StoreKitUI and MeidaPlayer
构架。
并且您的某些build设置配置不正确。请使用此图像中显示的确切配置。 Other Linker flag
必须是这样的:
和 C Language dialect
必须是这样的:
并且此配置与此图像完全相同:
我已经使用所有这些配置测试了您的应用程序,现在该应用程序在 iOS7 和 iOS 6 上运行良好。
关于ios - metaio 的 mach-o 链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20686213/