【发布时间】:2014-08-19 07:33:50
【问题描述】:
我正在使用 Google Tesseract OCR 为带有 Xcode 5 的 iOS7 构建应用程序: http://lois.di-qual.net/blog/install-and-use-tesseract-on-ios-with-tesseract-ios/
它可以很好地识别英语,但我无法在项目中添加任何其他语言。然后我发现其他一些项目通过编译 Tesseract 库成功地做到了: http://inspirationteam.weebly.com/home/compile-use-tesseract-ocr-lib-301-on-ios http://tinsuke.wordpress.com/2011/11/01/how-to-compile-and-use-tesseract-3-01-on-ios-sdk-5/
根据这些文章,我的llvm-g++和llvm-gcc应该在
export CXX="$DEVROOT/usr/bin/llvm-g++"
export CC="$DEVROOT/usr/bin/llvm-gcc"
$DEVROOT 应该是这样的
export DEVROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
虽然我使用的是 Xcode 5 和 Mac OSX 9.2(我听说这些人的 C 编译器发生了一些变化),但这些路径对我不起作用:
checking build system type... i386-apple-darwin13.3.0
checking host system type... i386-apple-darwin13.3.0
checking how to print strings... printf
checking for gcc... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc
checking whether the C compiler works... no
configure: error: in `/Users/phuoc-de/Desktop/a/leptonica-1.71':
configure: error: C compiler cannot create executables
See `config.log' for more details
我已经安装了命令行,但是还是不行。 有谁知道如何解决这个问题?谢谢。
【问题讨论】:
-
那篇文章已有 2 年历史了,我看不出更改编译器将如何帮助解决您面临的问题(您不是说您无法编译 tesseract,对吗)。跨度>
-
是的,我无法编译 tesseract。我知道这是一篇旧文章,我已经尝试了所有解决方案,但到目前为止还没有运气。所以我决定再次编译库并遇到这个问题。你知道其他方法吗?我将非常感激。谢谢你的光临。
标签: ios xcode gcc compiler-construction tesseract