移植unrar到Android

来源:互联网 发布:mac自带视频剪辑软件 编辑:程序博客网 时间:2024/05/16 14:38

创建Android.mk

cmd-strip = $(TOOLCHAIN_PREFIX)strip --strip-debug -x $1

 

LOCAL_CFLAGS += -fvisibility=hidden -fexceptions -fno-exceptions -DUNRAR -c -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 

 

LOCAL_ARM_MODE := arm

LOCAL_MODULE:= unrar

LOCAL_MODULE_TAGS := optional

LOCAL_SHARED_LIBRARIES := libcutils libstdc++ libc

 

生成可执行程序

 

其中会碰到error

 

Build error:

  1. error:
    undefined reference to `__cxa_end_cleanup'  
    undefined reference to `__gxx_personality_v0' 
    Solution:
    Add compile flags -fno-exceptions
  2. error:
    undefined reference to 'vtable for __cxxabiv1::__class_type_info'
    undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
    Solution:
    Add compile flags -fno-rtti

原创粉丝点击