androidに付属する共有ライブラリで宣言されている関数への未定義の参照を取得し続ける理由を理解しようとしています。
私のapplication.mkとrootandroid.mk
APP_MODULES := adhoc
APP_STL := gnustl_shared
NDK_TOOLCHAIN_VERSION=clang3.1
APP_OPTIM := debug
CUR_PATH := $(call my-dir)
LOCAL_CPPFLAGS += -std-c++11 -Wwrite-strings
include $(CUR_PATH)/native/adhoc/Android.mk
アドホックAndroid.mk
LOCAL_PATH := $(call my-dir)
updater_src_files := \
install.cpp\
sha1.cpp\
addhoc_lib.cpp
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(updater_src_files)
inc_path = $(NDK_ROOT)/../AndroidSource/system/core/include \
$(NDK_ROOT)/../AndroidSource/hardware/libhardware_legacy/include
LOCAL_C_INCLUDES += $(inc_path)
LOCAL_CFLAGS := -DINTERNAL_SHA1 -DCONFIG_CRYPTO_INTERNAL -DCONFIG_NO_T_PRF -DCONFIG_NO_TLS_PRF -std=c++11 -Wc++11-extensions -Wno-deprecated-writable-strings
LOCAL_STATIC_LIBRARIES := libedify
LOCAL_SHARED_LIBRARIES := libcutils\
libhardware_legacy\
libc\
libnetutils\
libsysutils
LOCAL_MODULE := adhoc
include $(BUILD_SHARED_LIBRARY)
$(call import-add-path, $(LOCAL_PATH))
$(call import-module, edify)
およびadhoc/edify / android.mk
LOCAL_PATH := $(call my-dir)
edify_src_files := \
lexer.l \
parser.y \
expr.c
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(edify_src_files)
LOCAL_CFLAGS := $(edify_cflags)
LOCAL_MODULE := edify
include $(BUILD_STATIC_LIBRARY)
次のようにndk-build-BV=1から出力を取得します。
SharedLibrary : libadhoc.so
/home/corey/Android_Dev/android-ndk-r8d/toolchains/llvm-3.1/prebuilt/linux-x86/bin/clang++ -Wl,-soname,libadhoc.so -shared --sysroot=/home/corey/Android_Dev/android-ndk-r8d/platforms/android-14/arch-arm ./obj/local/armeabi/objs-debug/adhoc/install.o ./obj/local/armeabi/objs-debug/adhoc/sha1.o ./obj/local/armeabi/objs-debug/adhoc/addhoc_lib.o ./obj/local/armeabi/libedify.a ./obj/local/armeabi/libgnustl_shared.so -gcc-toolchain /home/corey/Android_Dev/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86 -no-canonical-prefixes -target armv5te-none-linux-androideabi -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now /home/corey/Android_Dev/android-ndk-r8d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/libsupc++.a -lc -lm -o ./obj/local/armeabi/libadhoc.so
/home/corey/Android_Dev/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs-debug/adhoc/install.o: in function GetPropFn(char const*, State*, int, Expr**):jni/native/adhoc/install.cpp:463: error: undefined reference to 'property_get'