如何使用Android的tesseract Android.mk文件在我的Android.mk? [英] How to use Android tesseract Android.mk files in my Android.mk?
问题描述
我是挖在我的项目中使用 Android的API的tesseract
。
I was digging on using android tesseract api
in my project.
https://github.com/rmtheis/tess-two
我复制的 com_google code_leptonica_android 和 com_google code_tesseract_android 从苔丝二目录到我的项目的 JNI目录,我的 JNI文件夹结构
I copied com_googlecode_leptonica_android and com_googlecode_tesseract_android directory from tess-two to my project jni directory, my jni folder structure:
Android.mk
Application.mk
com_googlecode_leptonica_android
com_googlecode_tesseract_android
main_jni.cpp
...other h and cpp files...
我不知道如何将在 Android.mk文件在 com_google code_leptonica_android 和 com_google code_tesseract_android 里面我的 Android.mk 文件中的 JNI目录
I'm not sure how to include the Android.mk files in com_googlecode_leptonica_android and com_googlecode_tesseract_android inside my Android.mk file in jni directory.
LOCAL_PATH := $(call my-dir)
TESSERACT_PATH := $(LOCAL_PATH)/com_googlecode_tesseract_android/src
LEPTONICA_PATH := $(LOCAL_PATH)/com_googlecode_leptonica_android/src
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
$(info $(NDK_MODULE_PATH))
LOCAL_CFLAGS := -Wno-psabi
LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
LOCAL_STATIC_LIBRARIES += android_native_app_glue
FILE_LIST_CPP := $(wildcard $(LOCAL_PATH)/*.cpp) # finds all cpp files
LOCAL_SRC_FILES := $(FILE_LIST_CPP:$(LOCAL_PATH)/%=%)
LOCAL_CFLAGS += \
-DDEBUG \
-DDEFAULT_DIR=\"/default\"
LOCAL_MODULE := MyModule
include $(BUILD_SHARED_LIBRARY)
这是行不通的。
如何得到这个工作呢?
推荐答案
我无法编译苔丝个项目Android.mk文件,我刚刚结束了与进口的 libtess.so 和< STRONG> liblept.so 文件到我的Android.mk为prebuilt库,我可以在我的JNI文件中使用的tesseract库。
I couldn't compile Android.mk files in tess-two project, I just ended up with importing libtess.so and liblept.so files into my Android.mk as prebuilt library and I could use tesseract libraries in my jni file.
这篇关于如何使用Android的tesseract Android.mk文件在我的Android.mk?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!