tesseract 解决方法
最近想做一个简单的手写识别,返现一个hwlib的挺好用,结果要10k的正版授权,果断不用了。搜索了一下发现了这个,结果很多都是以前的版本的,而且貌似对工程的配置也有问题,摸索了很久,就快要绝望的时候在github上找到了这位大牛编译的framework版本,很好用https://github.com/ldiqual/tesseract-ios。只要按照上面的步骤,就ok!
Add the framework "TesseractOCR.framework" (you can drag&drop it) from the Products folder in this repo, to your XCode Project under the frameworks folder.
If you are masochist :) you can generate your TesseractOCR.framework building the TesseractOCRAggregate target.
If you are using iOS7 or greater, link libstdc++.6.0.9.dylib library (Your target => General => Linked Frameworks and Libraries => + => libstdc++.6.0.9)
Go to your project, click on the project and in the Build Settings tab add -lstdc++ to all the "Other Linker Flags" keys.
Go to your project settings, and ensure that C++ Standard Library => Compiler Default. (thanks tohttps://github.com/trein)
Import the tessdata folder under the root of your project. It contains the "tessdata" files. You can add more tessdata files copyng them here.
Import the header in your classes writing #import <TesseractOCR/TesseractOCR.h>