将libsvgandroid移植到android [英] Porting libsvgandroid to android

查看:80
本文介绍了将libsvgandroid移植到android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我下载ImageViewSvg.tar并将ImageViewSvg / jni放到android / external。

我可以构建libsvgandroid.so但是无法构建libsvgagg.so。

android.mk是



Hi

I download ImageViewSvg.tar and put ImageViewSvg/jni to android/external.
I can build libsvgandroid.so but cannot build libsvgagg.so.
The android.mk is

/*****************************************************************/
include $(CLEAR_VARS)

LOCAL_MODULE    := libsvgagg

LOCAL_CFLAGS += -EL -DCONFIG_DIR=\"/\" -Iexternal/libsvgandroid/libagg/agg/include/ -Iexternal/libsvgandroid/libagg/agg/gpc/ -Iexternal/libsvgandroid/libagg/aggsvg \
-Iexternal/libsvgandroid/libexpat/ -Iexternal/libsvgandroid/libexpat/expat/ -DHAVE_CONFIG_H -DHAVE_EXPAT_CONFIG_H -Wall

LOCAL_CPPFLAGS += -EL -fno-exceptions

LIBAGG_SOURCES = \
libagg/agg/src/agg_arc.cpp \
libagg/agg/src/agg_image_filters.cpp \
libagg/agg/src/agg_line_aa_basics.cpp \
libagg/agg/src/agg_line_profile_aa.cpp \
libagg/agg/src/agg_trans_warp_magnifier.cpp \
libagg/agg/src/agg_vcgen_contour.cpp \
libagg/agg/src/agg_vcgen_markers_term.cpp \
libagg/agg/src/agg_vpgen_clip_polygon.cpp \
libagg/agg/src/agg_vpgen_clip_polyline.cpp \
libagg/agg/src/agg_vpgen_segmentator.cpp \
libagg/agg/src/agg_rounded_rect.cpp \
libagg/agg/src/agg_trans_affine.cpp \
libagg/agg/src/agg_trans_single_path.cpp \
libagg/agg/src/agg_bspline.cpp \
libagg/agg/src/agg_vcgen_bspline.cpp \
libagg/agg/src/agg_vcgen_stroke.cpp \
libagg/agg/src/agg_vcgen_smooth_poly1.cpp \
libagg/agg/src/agg_vcgen_dash.cpp \
libagg/agg/src/agg_trans_double_path.cpp \
libagg/agg/src/agg_sqrt_tables.cpp \
libagg/agg/src/agg_bezier_arc.cpp \
libagg/agg/src/agg_curves.cpp \
libagg/agg/src/agg_gsv_text.cpp \
libagg/agg/src/agg_embedded_raster_fonts.cpp \
libagg/agg/gpc/gpc.c \
libagg/aggsvg/agg_svg_parser.cpp \
libagg/aggsvg/agg_svg_path_renderer.cpp \
libagg/aggsvg/agg_svg_path_tokenizer.cpp \
libagg/aggsvg-android/aggsvgandroid.cpp

# libexpat stuff
LIBEXPAT_SOURCES = libexpat/expat/xmlparse.c libexpat/expat/xmlrole.c libexpat/expat/xmltok.c libexpat/expat/xmltok_impl.c libexpat/expat/xmltok_ns.c


# package it
LOCAL_LDLIBS    := -lm -llog -ljnigraphics
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
LOCAL_SRC_FILES := \
$(LIBEXPAT_SOURCES) $(LIBAGG_SOURCES)

include $(BUILD_SHARED_LIBRARY)

/*****************************************************************/





错误是

/ *********** ************************************************** **** /



And the error is
/*****************************************************************/

../../../../../usr/include/c++/4.4/cwchar:164: error: a€?::vfwscanfa€? has not been declared
../../../../../usr/include/c++/4.4/cwchar:168: error: a€?::vswscanfa€? has not been declared
../../../../../usr/include/c++/4.4/cwchar:172: error: a€?::vwscanfa€? has not been declared
../../../../../usr/include/c++/4.4/cwchar:189: error: a€?::wcstofa€? has not been declared




Android/prebuilt/linux-x86/toolchain/mips-4.4.6/bin/../lib/gcc/mips-linux-gnu/4.4.6/../../../../mips-linux-gnu/include/c++/4.4.6/mips-linux-gnu/el/bits/gthr-default.h:127: error: a€?pthread_cancela€? was not declared in this scope
Android/prebuilt/linux-x86/toolchain/mips-4.4.6/bin/../lib/gcc/mips-linux-gnu/4.4.6/../../../../mips-linux-gnu/include/c++/4.4.6/mips-linux-gnu/el/bits/gthr-default.h:127: error: invalid type in declaration before a€?;a€? token







Android/prebuilt/linux-x86/toolchain/mips-4.4.6/bin/../lib/gcc/mips-linux-gnu/4.4.6/../../../../mips-linux-gnu/include/c++/4.4.6/mips-linux-gnu/el/bits/ctype_base.h:48: error: a€?_ISuppera€? was not declared in this scope



等.....

/ ************* ************************************************** ** /

有人可以帮忙吗?

谢谢


and so .....
/*****************************************************************/
Can anyone help ?
thanks

推荐答案

(CLEAR_VARS)

LOCAL_MODULE:= libsvgagg

LOCAL_CFLAGS + = -EL -DCONFIG_DIR = \/ \ - Iexternal / libsvgandroid / libagg / agg / include / -Iexternal / libsvgandroid / libagg / agg / gpc / -Iexternal / libsvgandroid / libagg / aggsvg \
-Iexternal / libsvgandroid / libexpat / -Iexternal / libsvgandroid / libexpat / expat / -DHAVE_CONFIG_H -DHAVE_EXPAT_CONFIG_H -Wall

LOCAL_CPPFLAGS + = -EL -fno-exceptions

LIBAGG_SOURCES = \
libagg / agg / src / agg_arc.cpp \
libagg / agg / src / agg_image_filters.cpp \
libagg / agg / src / agg_line_aa_basics.cpp \
libagg / agg / src / agg_line_profile_aa.cpp \
libagg / agg / src / agg_trans_warp_magnifier.cpp \
libagg / agg / src /agg_vcgen_contour.cpp \
libagg / a gg / src / agg_vcgen_markers_term.cpp \
libagg / agg / src / agg_vpgen_clip_polygon.cpp \
libagg / agg / src / agg_vpgen_clip_polyline.cpp \
libagg / agg / src / agg_vpgen_segmentator .cpp \
libagg / agg / src / agg_rounded_rect.cpp \
libagg / agg / src / agg_trans_affine.cpp \
libagg / agg / src / agg_trans_single_path.cpp \
libagg / agg / src / agg_bspline.cpp \
libagg / agg / src / agg_vcgen_bspline.cpp \
libagg / agg / src / agg_vcgen_stroke.cpp \
libagg / agg / src / agg_vcgen_smooth_poly1.cpp \
libagg / agg / src / agg_vcgen_dash.cpp \
libagg / agg / src / agg_trans_double_path.cpp \
libagg / agg / src / agg_sqrt_tables .cpp \
libagg / agg / src / agg_bezier_arc.cpp \
libagg / agg / src / agg_curves.cpp \
libagg / agg / src / agg_gsv_text.cpp \
libagg / agg / src / agg_embedded_raster_fonts.cpp \
libagg / agg / gpc / gpc.c \
libagg / aggsvg / agg_svg_parser.cpp \
libagg / aggsvg / agg_svg_path_renderer。 cpp \
libagg / aggsvg / agg_svg_path_tokenizer.cpp \
libagg / aggsvg-android / aggsvgandroid.cpp

#libexpat stuff
LIBEXPAT_SOURCES = libexpat / expat / xmlparse.c libexpat / expat / xmlrole.c libexpat / expat / xmltok.c libexpat / expat / xmltok_impl.c libexpat / expat / xmltok_ns.c


#package it
LOCAL_LDLIBS:= -lm -llog -ljnigraphics
LOCAL_MODULE_TAGS:=可选
LOCAL_PRELINK_MODULE:= false
LOCAL_SRC_FILES:= \
(CLEAR_VARS) LOCAL_MODULE := libsvgagg LOCAL_CFLAGS += -EL -DCONFIG_DIR=\"/\" -Iexternal/libsvgandroid/libagg/agg/include/ -Iexternal/libsvgandroid/libagg/agg/gpc/ -Iexternal/libsvgandroid/libagg/aggsvg \ -Iexternal/libsvgandroid/libexpat/ -Iexternal/libsvgandroid/libexpat/expat/ -DHAVE_CONFIG_H -DHAVE_EXPAT_CONFIG_H -Wall LOCAL_CPPFLAGS += -EL -fno-exceptions LIBAGG_SOURCES = \ libagg/agg/src/agg_arc.cpp \ libagg/agg/src/agg_image_filters.cpp \ libagg/agg/src/agg_line_aa_basics.cpp \ libagg/agg/src/agg_line_profile_aa.cpp \ libagg/agg/src/agg_trans_warp_magnifier.cpp \ libagg/agg/src/agg_vcgen_contour.cpp \ libagg/agg/src/agg_vcgen_markers_term.cpp \ libagg/agg/src/agg_vpgen_clip_polygon.cpp \ libagg/agg/src/agg_vpgen_clip_polyline.cpp \ libagg/agg/src/agg_vpgen_segmentator.cpp \ libagg/agg/src/agg_rounded_rect.cpp \ libagg/agg/src/agg_trans_affine.cpp \ libagg/agg/src/agg_trans_single_path.cpp \ libagg/agg/src/agg_bspline.cpp \ libagg/agg/src/agg_vcgen_bspline.cpp \ libagg/agg/src/agg_vcgen_stroke.cpp \ libagg/agg/src/agg_vcgen_smooth_poly1.cpp \ libagg/agg/src/agg_vcgen_dash.cpp \ libagg/agg/src/agg_trans_double_path.cpp \ libagg/agg/src/agg_sqrt_tables.cpp \ libagg/agg/src/agg_bezier_arc.cpp \ libagg/agg/src/agg_curves.cpp \ libagg/agg/src/agg_gsv_text.cpp \ libagg/agg/src/agg_embedded_raster_fonts.cpp \ libagg/agg/gpc/gpc.c \ libagg/aggsvg/agg_svg_parser.cpp \ libagg/aggsvg/agg_svg_path_renderer.cpp \ libagg/aggsvg/agg_svg_path_tokenizer.cpp \ libagg/aggsvg-android/aggsvgandroid.cpp # libexpat stuff LIBEXPAT_SOURCES = libexpat/expat/xmlparse.c libexpat/expat/xmlrole.c libexpat/expat/xmltok.c libexpat/expat/xmltok_impl.c libexpat/expat/xmltok_ns.c # package it LOCAL_LDLIBS := -lm -llog -ljnigraphics LOCAL_MODULE_TAGS := optional LOCAL_PRELINK_MODULE := false LOCAL_SRC_FILES := \


(LIBEXPAT_SOURCES)
(LIBEXPAT_SOURCES)


(LIBAGG_SOURCES)

include
(LIBAGG_SOURCES) include


这篇关于将libsvgandroid移植到android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆