android library so,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/).

回答1:

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...

回答2:

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

来源:https://stackoverflow.com/questions/5633023/include-so-library-to-android-ndk-project

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值