读书人

移栽libharu至android

发布时间: 2013-09-12 22:07:04 作者: rapoo

移植libharu至android
include $(CLEAR_VARS) LOCAL_MODULE := haru_fontLOCAL_SRC_FILES := font_demo.cppLOCAL_C_INCLUDES := $(LOCAL_PATH)/libharu/includeLOCAL_CPPFLAGS += -fexceptionsLOCAL_STATIC_LIBRARIES := z png haruinclude $(BUILD_SHARED_LIBRARY)

?

?

如果只是这样,会报错

error: dereferencing pointer to incomplete type

?

需要

1) 缺少 pnglibconf.h ,这个文件在png/scripts/pnglibconf.h.prebuilt ,拷贝出来,改名为pnglibconf.h

2)增加 hpdf_image_png.c 的头文件, 在#include <png.h> 后增加

#include <pngstruct.h>
#include <pnginfo.h>

?

即可成功!

?

读书人网 >Android

热点推荐