Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to compile harfbuz_ng library using NDK
    primarykey
    data
    text
    <p>I am developing an application in which i am using <a href="https://code.google.com/p/indic-text-renderer/" rel="nofollow noreferrer">indic-text-renderer</a> for devnagri text renderering.As this is NDK library;i am trying to compile it using <code>ndk-build</code> command. But it gives me following error:</p> <pre><code>Android NDK: Trying to define local module 'harfbuzz_ng' in /cygdrive/d/Project_WorkSpace/indic-text-renderer//jni/harfbuzz-ng/Android.mk. Android NDK: But this module was already defined by /cygdrive/d/Project_WorkSpace/indic-text-renderer//jni/harfbuzz-ng/Android.mk. </code></pre> <p>My android.mk file is:</p> <pre><code> LOCAL_PATH := $(call my-dir) MY_LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_ARM_MODE := arm LOCAL_MODULE := complex-script-rendering LOCAL_C_INCLUDES := $(LOCAL_PATH)/freetype/include $(LOCAL_PATH)/harfbuzz-ng/src LOCAL_SRC_FILES := complex-script-rendering.c LOCAL_STATIC_LIBRARIES := ft2 harfbuzz LOCAL_LDLIBS := -llog include $(BUILD_SHARED_LIBRARY) include $(MY_LOCAL_PATH)/freetype/Android.mk include $(MY_LOCAL_PATH)/harfbuzz-ng/Android.mk </code></pre> <p><img src="https://i.stack.imgur.com/EIY02.png" alt="JNI-hierarchy"></p> <p>How can i resolve this error?</p> <p>I am very new to the NDK programming,so pls let me know if this information is not sufficient</p> <p><strong>Edit:</strong></p> <p><strong>freetype/Android.mk</strong></p> <pre><code>ifndef USE_FREETYPE USE_FREETYPE := 2.4.2 endif ifeq ($(USE_FREETYPE),2.4.2) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) # compile in ARM mode, since the glyph loader/renderer is a hotspot # when loading complex pages in the browser # LOCAL_ARM_MODE := arm LOCAL_SRC_FILES:= \ src/base/ftbbox.c \ src/base/ftbitmap.c \ src/base/ftfstype.c \ src/base/ftglyph.c \ src/base/ftlcdfil.c \ src/base/ftstroke.c \ src/base/fttype1.c \ src/base/ftxf86.c \ src/base/ftbase.c \ src/base/ftsystem.c \ src/base/ftinit.c \ src/base/ftgasp.c \ src/raster/raster.c \ src/sfnt/sfnt.c \ src/smooth/smooth.c \ src/autofit/autofit.c \ src/truetype/truetype.c \ src/cff/cff.c \ src/psnames/psnames.c \ src/pshinter/pshinter.c LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/builds \ $(LOCAL_PATH)/include LOCAL_CFLAGS += -W -Wall LOCAL_CFLAGS += -fPIC -DPIC LOCAL_CFLAGS += "-DDARWIN_NO_CARBON" LOCAL_CFLAGS += "-DFT2_BUILD_LIBRARY" # the following is for testing only, and should not be used in final builds # of the product #LOCAL_CFLAGS += "-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER" LOCAL_CFLAGS += -O2 LOCAL_MODULE:= libft2 include $(BUILD_STATIC_LIBRARY) endif </code></pre> <p><strong>harfbuzz-ng/android.mk</strong></p> <pre><code>LOCAL_PATH:= $(call my-dir) HARFBUZZ_SRC_FILES = \ src/hb-blob.cc \ src/hb-buffer-serialize.cc \ src/hb-buffer.cc \ src/hb-common.cc \ src/hb-fallback-shape.cc \ src/hb-face.cc \ src/hb-font.cc \ src/hb-ot-tag.cc \ src/hb-set.cc \ src/hb-shape.cc \ src/hb-shape-plan.cc \ src/hb-shaper.cc \ src/hb-tt-font.cc \ src/hb-unicode.cc \ src/hb-warning.cc \ src/hb-ot-layout.cc \ src/hb-ot-map.cc \ src/hb-ot-shape.cc \ src/hb-ot-shape-complex-arabic.cc \ src/hb-ot-shape-complex-default.cc \ src/hb-ot-shape-complex-indic.cc \ src/hb-ot-shape-complex-indic-table.cc \ src/hb-ot-shape-complex-myanmar.cc \ src/hb-ot-shape-complex-sea.cc \ src/hb-ot-shape-complex-thai.cc \ src/hb-ot-shape-normalize.cc \ src/hb-ot-shape-fallback.cc ############################################################# # build the harfbuzz library # include $(CLEAR_VARS) LOCAL_ARM_MODE := arm LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES:= \ $(HARFBUZZ_SRC_FILES) \ src/hb-icu.cc LOCAL_CPP_EXTENSION := .cc LOCAL_SHARED_LIBRARIES := \ libcutils \ libicuuc \ libicui18n \ libutils LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/src \ external/icu4c/common LOCAL_CFLAGS += -DHB_NO_MT -DHAVE_OT -DHAVE_ICU LOCAL_LDLIBS += -lpthread LOCAL_MODULE:= libharfbuzz_ng include $(BUILD_SHARED_LIBRARY) ############################################################# # build the harfbuzz static library # include $(CLEAR_VARS) LOCAL_ARM_MODE := arm LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES:= \ $(HARFBUZZ_SRC_FILES) \ src/hb-ucdn.cc \ src/hb-ucdn/ucdn.c LOCAL_CPP_EXTENSION := .cc LOCAL_STATIC_LIBRARIES := libft2 LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/src \ external/freetype/include LOCAL_CFLAGS += -DHB_NO_MT -DHAVE_OT -DHAVE_UCDN -DHAVE_FREETYPE LOCAL_LDLIBS += -lpthread LOCAL_MODULE:= libharfbuzz_ng include $(BUILD_STATIC_LIBRARY) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload