Search code examples
androidandroid-ndktesseractndk-buildtess-two

Unable to build tess-two library


I'm trying to build the tess-two library by following this tutorial: http://www.codeproject.com/Tips/840623/Android-Character-Recognition On Windows the compile of the library fails immediately on Linux I receive the following error:

make: Entering directory "/home/daniele/tess/eyes-two/src/main"
[armeabi] Compile++ thumb: hydrogen <= clusterer.cpp
[armeabi] Compile++ thumb: hydrogen <= hydrogentextdetector.cpp
[armeabi] Compile++ thumb: hydrogen <= thresholder.cpp
[armeabi] Compile++ thumb: hydrogen <= utilities.cpp
[armeabi] Compile++ thumb: hydrogen <= validator.cpp
[armeabi] Compile++ thumb: hydrogen <= hydrogentextdetector.cpp
[armeabi] Compile++ thumb: hydrogen <= thresholder.cpp
[armeabi] Compile++ thumb: hydrogen <= jni.cpp
make: ***  No rule to make target "jni/../../../../tess-two/libs/armeabi/liblept.so", needed by "obj/local/armeabi/libhydrogen.so".  Stop.
make: Leaving directory "/home/daniele/tess/eyes-two/src/main"

These are the steps that I have done:

export ANDROID_HOME=/home/daniele/Android/Sdk/
export ANDROID_NDK_HOME=/home/daniele/Android/Ndk
git clone git://github.com/rmtheis/tess-two tess
cd tess
sudo /home/daniele/Android/Ndk/ndk-build -C eyes-two/src/main/

Solution

  • That tutorial is out of date. You can skip to step 3 in that tutorial by following the instructions (see "Usage") on the tess-two project. This will use a pre-compiled version of the library, so you don't have to build the C++ code yourself.