开发者

Include .so library to android ndk project

I'm beginning with android NDK. I have to compile a native library for the 1.6 sdk (mupdf) but it requires the ljnigraphics lib (which was added lately on 2.2). I'm trying to include the compiled library to my android project but I can't figure out how to do it. 1. Is it the best way to do this ? 2. If yes how should I proceed ? Any tutorial or information to start will be appreciated. 3. If not do 开发者_如何学运维you know any pdf library i could use on android 1.6 ?

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_MODULE    := ljnigraphics 
LOCAL_SRC_FILES := ljnigraphics.so

include $(PREBUILT_STATIC_LIBRARY)
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 ljnigraphics

LOCAL_LDLIBS    := -lm -llog

include $(BUILD_SHARED_LIBRARY)

EDIT : I succeeded compiling the mupdf library for android 1.6 thanks to the work of Hans-Werner Hilse (http://code.google.com/p/droidreader/).


a lightweight, fast PDF and XPS viewer capable to run on multiple platforms, including Android and iOS. https://code.google.com/p/apv/ try this...


I finally used the code at http://code.google.com/p/droidreader/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜