通过android NDK编译tesseract
我正在尝试使用 android ndk r5 编译适用于 android 的 tesseract,tesseract 的代码是通过查看 http://code.google.com/p/tesseract-android-tools/,我无法编译tesseract并出现错误,
Install : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target `//cygdrive/e/DemoExamples_WorkSpace/tesseract-android-tools/jni/../external/leptonlib-1.66/src/adaptmap.c', needed b
y `/cygdrive/e/DemoExamples_WorkSpace/tesseract-android-tools/obj/local/armeabi/objs/lept//cygdrive/e/DemoExamples_WorkSpace/tesseract-android-tools/j
ni/../external/leptonlib-1.66/src/adaptmap.o'. Stop.
请帮我解决这个问题。
I am trying to compile tesseract for android using android ndk r5, code of tesseract is obtained by checking out http://code.google.com/p/tesseract-android-tools/, i am unable to compile tesseract and got errors,
Install : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target `//cygdrive/e/DemoExamples_WorkSpace/tesseract-android-tools/jni/../external/leptonlib-1.66/src/adaptmap.c', needed b
y `/cygdrive/e/DemoExamples_WorkSpace/tesseract-android-tools/obj/local/armeabi/objs/lept//cygdrive/e/DemoExamples_WorkSpace/tesseract-android-tools/j
ni/../external/leptonlib-1.66/src/adaptmap.o'. Stop.
Please help me to sort out this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我有同样的问题,我想我已经解决了。可能对那些遇到类似错误的人有帮助:
在 OSX 上,我只是通过给出绝对路径来更改 Android.mk 文件,如下所示
:首先:jni/Android.mk
然后:jni/com_googlecode_leptonica_android /Android.mk
和 jni/com_googlecode_tesseract_android/Android.mk 相应。
我相信问题是由以下命令返回的相对路径引起的:
然后我需要以超级用户身份运行 ndk-build 并且所有编译都很好。
I had the same issue and I think I solved it. May be helpful for those who get similar errors:
On OSX, I just changed the Android.mk files by giving the absolute paths as follows
First: jni/Android.mk
Then: jni/com_googlecode_leptonica_android/Android.mk
and jni/com_googlecode_tesseract_android/Android.mk accordingly.
I believe the problem is caused by the relative path which is returned by the following command:
Then I needed to run the ndk-build as superuser and all compiled just fine.
在 makefile 中搜索 Adaptmap。首先构建创建此模块的 makefile。
Search for adaptmap among the makefiles. Build the makefile that creates this module first.
所以,我在 Windows 7 和 Windows XP 中进行了编译,但这是一个丑陋的解决方法。
基本问题是“LOCAL_PATH :=”带有空白值,我不知道为什么 cygwin 有这个问题,所以你必须更改 Android.mk 文件上的路径才能工作。
我将使用数字引用Android.mk,我的jni路径是:
===================================
== ===================================================
==============
对于我在 Windows 7、Windows XP、Mac 和 Ubuntu 上工作。
So, I have compiled in windows 7 and windows xp, but it´s an ugly workaround.
The basic problem is "LOCAL_PATH := "with blank value, I don´t know why cygwin have problem with this, so you have to change paths on Android.mk files to work.
I will refer for Android.mk using numbers, my jni path is:
=================================
=================================
=================================
For me working on windows 7, windows xp, Mac and Ubuntu.