体系结构x86_64的未定义符号:“ _OBJC_METACLASS _ $ _ GMVDetector”引用自:TextDetector

时间:2018-08-20 14:09:57

标签: ios xcode xcode9 google-vision google-ios-vision

我在不带cocoapods的情况下将Google Firebase MLKit包含到了我的项目中。尝试构建时,出现Undefined symbol错误:Xcode error image

Undefined symbols for architecture armv7:
  "_OBJC_METACLASS_$_GMVDetector", referenced from:
      l45918 in TextDetector
  "_OBJC_CLASS_$_GMVDetector", referenced from:
      l45917 in TextDetector
  "_OBJC_CLASS_$_GMVFeature", referenced from:
      _OBJC_CLASS_$_GMVTextBlockFeature in TextDetector
      _OBJC_CLASS_$_GMVTextLineFeature in TextDetector
      _OBJC_CLASS_$_GMVTextElementFeature in TextDetector
  "_OBJC_METACLASS_$_GMVFeature", referenced from:
      l45914 in TextDetector
      l45915 in TextDetector
      l45916 in TextDetector
  "_OBJC_CLASS_$_GMVUtility", referenced from:
      objc-class-ref in TextDetector
  "_OBJC_CLASS_$_GMVLogger", referenced from:
      objc-class-ref in TextDetector
  "_GMVFeatureTypeTextLine", referenced from:
      l31298 in TextDetector
  "_GMVDetectorImageOrientation", referenced from:
      l31341 in TextDetector
      l31342 in TextDetector
  "_GMVFeatureTypeTextElement", referenced from:
      l31313 in TextDetector
  "_GMVFeatureTypeTextBlock", referenced from:
      l31279 in TextDetector
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

到目前为止,我已经尝试过:

  1. 退出Xcode,然后清理构建
  2. 手动以及框架的拖放
  3. 链接了所有必需的资源文件夹
  4. 删除Xcode临时文件
  5. symbols hidden by default下的Build Settings设置为No 尽管框架TextDetector已链接到正确的目标。

所有这些似乎都不起作用。我遵循Integrate without CocoaPods进行框架设置。

Project Structure ImageArchitecture in Build Settings

1 个答案:

答案 0 :(得分:0)

此问题已解决。我在上述Firebase链接中添加了.zip文件随附的所有其他框架。 List of Frameworks。这不是简单的设置,在readme和网站中都没有提及。可能不需要所有这些框架,但是许多框架是相互依赖的,因为它们在每个框架的module.modulemap中已指定。