swift - Swift+Cocoapods:ld:警告:找不到或使用自动链接库“deepspeech”
问题描述
有谁知道为什么 RN 模块 cocoapod 会工作一晚,然后第二天就停止工作,尽管没有任何变化?我正在为 DeepSpeech 构建一个 React Native 模块:https ://github.com/zaptrem/react-native-transcription
其中一部分是使用 s.vendored_frameworks 配置 podspec 以使用预编译的 deepspeech_ios.framework。另一部分是使用 cocoapods-user-defined-build-types 插件使 cocoapods 仅将我的 pod 视为 dynamic_framework。它昨晚还在工作,但今天整个编译都失败了:
ld: warning: Could not find or use auto-linked library 'deepspeech'
Undefined symbols for architecture arm64:
"_DS_Version", referenced from:
deepspeech_ios.DeepSpeechVersion() -> Swift.String in deepspeech_ios(DeepSpeech.o)
(Many, many more symbols with a similar issue from DeepSpeech)
我尝试回滚到我确定它有效的提交,但我得到了相同的结果。
我还发现该项目不能永远加载。
解决方案
删除并重新制作 Xcode 项目文件和 deepspeech_ios.framework 修复了该问题。可能是 DeepSpeech 版本不匹配?使用此库时,也经常需要清除构建文件夹。
推荐阅读
- javascript - 每次用户调用其初始化时销毁旧的光滑轮播实例
- php - 如何识别页面的 URL 并根据 URL 执行操作
- python - 如何成功使用snow_record?
- javascript - Google Charts 散点图适用于 Chrome Macbook,但不适用于 Chrome iPhone
- r - ggplot2 ggsave:将嵌入字体保留在导出的 .png 中
- html - 更改为块并添加后,Wordpress 跨度宽度没有变化
- c# - Newtonsoft.Json 使用 MySqlDateTime 序列化数据表
- python - 如果该项目包含一个单词,如何从python列表中删除该项目
- vba - 单击按钮后从新选项卡中提取数据
- segmentation-fault - pytorch训练期间回波损失错误时的分段错误