当前位置: 首页 > 工具软件 > libogg++ > 使用案例 >

libogg.so fro android编译方法

谈灵均
2023-12-01

在网站下载源代码http://www.xiph.org/downloads/

解压然后打开cygwin配置

CXX=arm-linux-androideabi-g++.exe LD=arm-linux-androideabi-ld.exe AR=arm-linux-androideabi-ar.exe RANLIB=arm-linux-androideabi-ranlib.exe ./configure --prefix=/usr/local/

然后,android.mk的写法

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := demo
LOCAL_SRC_FILES := demo.cpp

include $(BUILD_SHARED_LIBRARY)


include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := ogg
LOCAL_SRC_FILES := d:\Soft\cygwin\home\musictom\androidlib\libogg-1.3.2\src\bitwise.c d:\Soft\cygwin\home\musictom\androidlib\libogg-1.3.2\src\framing.c
LOCAL_CFLAGS += -Id:\Soft\cygwin\home\musictom\androidlib\libogg-1.3.2\include
#LOCAL_SHARED_LIBRARIES :=
LOCAL_LDLIBS := -llog
#include $(BUILD_EXECUTABLE)

,在eclipse里点击project/build project,编译后会生成libs/armeabi/libogg.so

转载于:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/3960643.html

 类似资料: