本文介绍了致命错误:fitz.h:在muPDF库中没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在3天内为eclipse中的编译,没有任何成功



我下载并配置了android-ndk,cygwin



我得到这个仍然是

  15:25:36 ****构建配置项目的调试ChoosePDFActivity **** 
E:\\android- ndk\\android-ndk-r9d\\\\
dk-build.cmd全部
Android NDK:警告:E:/Workspace_SIL/ChoosePDFActivity //jni/Android.mk:mupdfcore:LOCAL_LDLIBS始终被忽略静态库
Android NDK:警告:E:/Workspace_SIL/ChoosePDFActivity //jni/Android.mk:mupdfcore:静态库总是忽略LOCAL_LDLIBS
[armeabi]编译thumb:mupdf< = mupdf .c
E:/Workspace_SIL/ChoosePDFActivity//jni/mupdf.c:10:18:致命错误:fitz.h:没有这样的文件或目录
编译被终止。
make.exe:*** [E:/Workspace_SIL/ChoosePDFActivity//obj/local/armeabi/objs-debug/mupdf/mupdf.o]错误1

15:25: 36构建完成(占489ms)

jni / mupdf.c:10:18:致命错误:fitz.h:没有这样的文件或目录



在哪里可以得到这个God Damn fitz.h和其他头文件



看到这发生在我的eclipse





包含以下路径用于我的头文件





安装程序这个Ndk路径这样







Update1



这是我的Androi d.mk文件

  LOCAL_PATH:= $(call my-dir)
TOP_LOCAL_PATH:= $(LOCAL_PATH)

MUPDF_ROOT:= ..

包含$(TOP_LOCAL_PATH)/Core.mk
包含$(TOP_LOCAL_PATH)/ThirdParty.mk

包括$(CLEAR_VARS)

LOCAL_C_INCLUDES:= \
$(MUPDF_ROOT)/ draw \
$(MUPDF_ROOT)/ fitz \
$(MUPDF_ROOT) / pdf
LOCAL_CFLAGS:=
LOCAL_MODULE:= mupdf
LOCAL_SRC_FILES:= mupdf.c
LOCAL_STATIC_LIBRARIES:= mupdfcore mupdfthirdparty

LOCAL_LDLIBS:= -lm - llog -ljnigraphics

include $(BUILD_SHARED_LIBRARY)


解决方案

您还使用了旧版本的MuPDF源代码。



1)使用最新版本(1.5当前或更好的工作,从git 2)不要使用eclipse构建它,使用在platform / android / ReadMe.txt中描述的支持的基于ndk / sdk的构建。如果要使用eclipse,只有在您以受支持的方式进行构建之后,才能执行此操作。



3)不要跳过指令的第10步。真的,为什么每个人都试图跳过第10步?



4)如果卡住了,请在freenode的#ghostscript irc频道中与我们交谈。在mupdf.com上可以找到一个网页链接。


I m trying to compile the muPDF lib in eclipse for android app since 3 days without any success

I downloaded and configured the android-ndk, cygwin

Im getting this still

15:25:36 **** Build of configuration Debug for project ChoosePDFActivity ****
"E:\\android-ndk\\android-ndk-r9d\\ndk-build.cmd" all 
Android NDK: WARNING:E:/Workspace_SIL/ChoosePDFActivity//jni/Android.mk:mupdfcore: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:E:/Workspace_SIL/ChoosePDFActivity//jni/Android.mk:mupdfcore: LOCAL_LDLIBS is always ignored for static libraries    
[armeabi] Compile thumb  : mupdf <= mupdf.c
E:/Workspace_SIL/ChoosePDFActivity//jni/mupdf.c:10:18: fatal error: fitz.h: No such file or directory
compilation terminated.
make.exe: *** [E:/Workspace_SIL/ChoosePDFActivity//obj/local/armeabi/objs-debug/mupdf/mupdf.o] Error 1

15:25:36 Build Finished (took 489ms)

jni/mupdf.c:10:18: fatal error: fitz.h: No such file or directory

where I can get this God Damn fitz.h and other header files

see this happens in my eclipse

included the following paths for my header files

setup android Ndk path like this

Update1

Here is my Android.mk file

LOCAL_PATH := $(call my-dir)
TOP_LOCAL_PATH := $(LOCAL_PATH)

MUPDF_ROOT := ..

include $(TOP_LOCAL_PATH)/Core.mk
include $(TOP_LOCAL_PATH)/ThirdParty.mk

include $(CLEAR_VARS)

LOCAL_C_INCLUDES := \
    $(MUPDF_ROOT)/draw \
    $(MUPDF_ROOT)/fitz \
    $(MUPDF_ROOT)/pdf
LOCAL_CFLAGS :=
LOCAL_MODULE    := mupdf
LOCAL_SRC_FILES := mupdf.c
LOCAL_STATIC_LIBRARIES := mupdfcore mupdfthirdparty

LOCAL_LDLIBS    := -lm -llog -ljnigraphics

include $(BUILD_SHARED_LIBRARY)
解决方案

You're also using an old version of the MuPDF source code.

1) Use the latest version (1.5 currently, or better, work from git).

2) Don't build it using eclipse, use the supported ndk/sdk based build as described in platform/android/ReadMe.txt. If you want to use eclipse, do so only after you have managed to build it in the supported way.

3) Do not skip step 10 of the instructions. Seriously, why does everyone try to skip step 10?

4) If you get stuck, come talk to us in the #ghostscript irc channel on freenode. A weblink can be found to this on mupdf.com

这篇关于致命错误:fitz.h:在muPDF库中没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 22:22