Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
926 views
in Technique[技术] by (71.8m points)

android - error in integration of mupdf library

I am working on a project in which i have to deal with pdf view. I am trying to integrate mupdf library in my project but getting error as mentioned below. I have followed all steps mentioned in readme document. please help me to solve this error.

Compile thumb : mupdf <= mupdf.c

jni/mupdf.c:10:18: fatal error: fitz.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/mupdf/mupdf.o] Error 1

My Android.mk file

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

MUPDF_ROOT := $(call my-dir)

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)/mupdf
LOCAL_CFLAGS :=
LOCAL_MODULE    := mupdf
LOCAL_SRC_FILES := mupdf.c
LOCAL_STATIC_LIBRARIES := mupdfcore mupdfthirdparty

LOCAL_LDLIBS    := -lm -llog -ljnigraphics

include $(BUILD_SHARED_LIBRARY)

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is how i succeeded in MuPDF.

download ndk and extract. download cygwin and extract. download mupdf source and thirdparty files.

extract source and thirdpart extract file add to here.

go to project directory using cygwin.

open project in eclipse and add this to application.mk

      NDK_TOOLCHAIN_VERSION=4.4.3

make header file using this command in cygwin

javah -jni -classpath bin/classes/ -d jni/ com.artifex.mupdf.MuPDFActivity

use cd .. and go back to MupdfSource extract directory and execute

    make

then error come .Use

make NOX11=yes

go to project directory (android folder) in cygwin and

ndk-build

thats all you get .so file

run the project.

Sorry for the bad English.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...