在不使用Cocoa Pod的情况下集成Firebase SDK时,找不到框架(MLVision/MLVisionTextModel)问题 [英] Getting framework(MLVision/MLVisionTextModel) not found issue when Integration firebase SDKs without using Cocoa pods

查看:90
本文介绍了在不使用Cocoa Pod的情况下集成Firebase SDK时,找不到框架(MLVision/MLVisionTextModel)问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发集成Firebase ML视觉套件,而未使用可可豆荚:

在应用中添加SDK框架(MLVision和MLVisionTextModel)时,出现以下错误:

ld:找不到体系结构x86_64的符号clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

要点1:

我在应用程序中遵循的步骤,以集成这些SDK的框架:

A.下载了Firebase SDK 5.20.2.

B.遵循Readme.md文件中定义的步骤.

首先,我将"Analytics"目录中的所有框架添加到项目导航器窗格中,并对Firebase.h文件执行相同的操作.在-ObjC标志添加到其他链接器设置在AppDelegate.m中,我添加了#import"Firebase.h"和[FIRApp configure];.

项目构建成功,没有任何错误.

C.遇到问题:为了进行文本识别,我在应用程序中添加了MLVision和MLVisionTextModel,如Readme.md中针对需求框架和资源的第5步所定义.

构建此项目时,我遇到以下应用错误:

我遇到以下错误

体系结构x86_64的未定义符号:"std :: __ 1 :: basic_iostream< char,std :: __ 1 :: char_traits< char> ::〜basic_iostream()",引用自:TextDetector中的l59875"std :: __ 1 :: basic_iostream< char,std :: __ 1 :: char_traits< char>>的typeinfo,引用自:TextDetector中的l59875ld:找不到体系结构x86_64clang的符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)

要点2:遇到问题

有时候,我在尝试通过Analytics(分析),MLVision和MLVisionTextModel的构建阶段中的使用库链接二进制文件"来添加SDK框架的尝试.

我的错误低于

ld:找不到框架FirebaseMLVisionTextModelclang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

注意:框架FirebaseMLVisionTextModel没有FirebaseMLVisionTextModel.h文件.它不存在FirebaseMLVisionTextModel框架中缺少的标头文件夹:对于没有任何头文件夹的TextDetector.framework,我也遇到了同样的问题.

Firebase.h:Firebase.h中的减速文件在框架中丢失:

  #if __has_include(< FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>)#import< FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>#万一 

  • Xcode版本:10.1
  • Firebase SDK版本:5.20.2
  • Firebase组件:ML套件(文本识别)
  • 组件版本:

请提出如何解决此问题的建议.

如何使用没有任何标头的 FirebaseMLVisionTextModel TextDetector 框架,这些框架只有exec文件?

解决方案

来自

I am working on integration firebase ML vision kit without using the cocoa pods:


I am getting below error when adding SDK frameworks(MLVision and MLVisionTextModel) in app :

ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Point 1:


My steps as I followed in app to integrate these SDK's framework :

A. Downloaded firebase SDK 5.20.2.


B. Followed the steps as defined inside the Readme.md file.


First, I added all framework from 'Analytics' directory into project navigator pane and do same thing for Firebase.h file.
Added the -ObjC flag to "Other Linker Settings
In AppDelegate.m , I add #import "Firebase.h" and [FIRApp configure];.

Project build successfully without any error.

C. Getting issue : For text recognition, I added MLVision and MLVisionTextModel in app as defined the step 5 in Readme.md for require framework and resource.


When I build this project I am getting below error in app:

I am getting below error as

Undefined symbols for architecture x86_64:
"std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from: l59875 in TextDetector
"typeinfo for std::__1::basic_iostream<char, std::__1::char_traits<char> >", referenced from: l59875 in TextDetector 
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Point 2: Getting issue

Sometimes I was trying same thing adding SDK's framework by 'Link Binaries With Libraries' in Build Phases for Analytics, MLVision and MLVisionTextModel.

I was getting below error as

ld: framework not found FirebaseMLVisionTextModel
 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Note: The framework FirebaseMLVisionTextModel doesn't have FirebaseMLVisionTextModel.h file. It doesn't exist header folder which is missing in FirebaseMLVisionTextModel framework:
 I am getting same issue for TextDetector.framework which doesn't have any header folder.

Firebase.h : Deceleration file in Firebase.h which is missing in framework:

#if __has_include(<FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>)
#import <FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>
#endif

  • Xcode version: 10.1
  • Firebase SDK version: 5.20.2
  • Firebase Component: ML Kit (text recognition)
  • Component version:

Pls suggest how do I fix this problem.

How do I use FirebaseMLVisionTextModel and TextDetector framework that doesn't have any header , these frameworks have only exec file?

解决方案

From https://github.com/firebase/firebase-ios-sdk/issues/2843:

The system C++ libraries are not being linked. That can happen with an incorrect Xcode module cache. Do rm -rf ~/Library/Developer/Xcode/DerivedData to reset. If that doesn't work, add libc++ to the Link Binary With Libraries Build Phase:

这篇关于在不使用Cocoa Pod的情况下集成Firebase SDK时,找不到框架(MLVision/MLVisionTextModel)问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆