iPhone: How to use Tesseract

柔情痞子 提交于 2019-12-08 07:40:49

问题


This is regarding use of Tesseract in an iPhone app. I followed the steps provided here:

http://iphone.olipion.com/cross-compilation/tesseract-ocr

Now I have 2 questions:

1) How to use this in my iPhone project (which files need to be included, methods need to be called, etc.)

2) I googled and found that I'll have to include libtesseract_api.a

but got this message:

file was built for unsupported file format which is not the architecture being linked (i386)

Please help me to understand this.


回答1:


I guess you have tried to run the app in Simulator, which will support i386 architecture.

Please follow this link to make the static library.




回答2:


Start here:

http://tinsuke.wordpress.com/2011/02/17/how-to-cross-compiling-libraries-for-ios-armv6armv7i386/

and then follow this updated guide:

http://tinsuke.wordpress.com/2011/11/01/how-to-compile-and-use-tesseract-3-01-on-ios-sdk-5/

It will help you cross compile and build a universal library that contains the arm6/arm7/i386 all in the one statically linked library so it should work on simulator and device and be suitable for AppStore distribution.

Also if you have XCode 4.3 or higher beware and read the comments about how the developer directory has changed.



来源:https://stackoverflow.com/questions/8969699/iphone-how-to-use-tesseract

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!