我正在使用谷歌提供的tesseract。在完成this教程后,我终于完成了我的应用程序。但是,当我运行它时,我遇到了未定义符号的问题。这是错误
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_G8Tesseract", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
如何解决此问题?我尝试在线搜索,但没有一个解决方案适合我。我尝试重新安装pod并更新它。然后我遇到了这个错误
clang: error: no such file or directory: '/Users/admin/Desktop/tst/Pods/Target Support Files/Pods-tst/Pods-tst-dummy.m'
clang: error: no input files
当我尝试重做项目时,我得到了他的错误
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_G8Tesseract", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:1)
显然,即使在使用可可豆荚并禁用Bitcode后,我也必须单独添加TesseractOCR.framework。这可以防止错误。
答案 1 :(得分:0)
我认为你应该更新pod版本:
sudo gem install cocoapods
此次运行后:
pod update --verbose
答案 2 :(得分:0)