首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

移栽libharu至android

2013-09-12 
移植libharu至androidinclude $(CLEAR_VARS) LOCAL_MODULE: haru_fontLOCAL_SRC_FILES : font_demo.cppL

移植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>

?

即可成功!

?

热点排行