I'm trying to build the libpng library into a static library on Android, but it's not working! Every time I try to build it, it doesn't do anything. Below is the android make file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CFLAGS :=
LOCAL_MODULE := libpng
LOCAL_SRC_FILES :=\
png.c \
pngerror.c \
pngget.c \
pngmem.c \
pngpread.c \
pngread.c \
pngrio.c \
pngrtran.c \
pngrutil.c \
pngset.c \
pngtrans.c \
pngwio.c \
pngwrite.c \
pngwtran.c \
pngwutil.c
LOCAL_LDLIBS := -lz
include $(BUILD_STATIC_LIBRARY)
And if I change the last line to include $(BUILD_SHARED_LIBRARY)
it builds correctly! Any help?
在同一目录中创建一个Application.mk
文件,然后输入以下行:
APP_MODULES := your-android-library-as-defined-in-Android.mk
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.