你好
我曾尝试使用 ndk-build 编译以下 Android.mk 文件。
我收到以下错误。我该如何解决这个问题?
请帮我。
制作文件是
# ================================================== ========
# NOTE:
# when executing binary, set LD_LIBRARY_PATH in device
# ================================================== ========
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
BASEDIR := ../../..
DISTDIR := ../../../..
LOCAL_MODULE := EvaluateFingerQuality
LOCAL_ARM_MODE := arm
# Includes
LOCAL_C_INCLUDES += \
$(BASEDIR)/Common/C \
$(DISTDIR)/Include
# Source files
LOCAL_SRC_FILES := \
$(BASEDIR)/Common/C/Utils.c \
EvaluateFingerQuality.c
LOCAL_LDLIBS += \
-Wl,-z,muldefs -Wl,-rpath=$(DISTDIR)/Lib/Android_$(TARGET_ARCH_ABI) \
-L $(DISTDIR)/Lib/Android_$(TARGET_ARCH_ABI) \
-lNLicensing -lNBiometricTools -lNBiometrics -lNMedia -lNCore -lc
include $(BUILD_EXECUTABLE)
错误是
$ ndk-build
Compile arm : EvaluateFingerQuality <= Utils.c
Compile arm : EvaluateFingerQuality <= EvaluateFingerQuality.c
Executable : EvaluateFingerQuality
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `pthread_rwlock_trywrlock'
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `pthread_rwlock_rdlock'
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `pthread_rwlock_tryrdlock'
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `pthread_rwlock_wrlock'
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `dladdr'
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `pthread_rwlock_destroy'
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `pthread_rwlock_init'
../../../../Lib/Android_armeabi/libNCore.so: undefined reference to `pthread_rwlock_unlock'
collect2: ld returned 1 exit status
/cygdrive/d/android-ndk-r8-windows/android-ndk-r8/build/core/build-binary.mk:381: recipe for target `/cygdrive/d/MegaMatcher_Embedded_1_2_SDK_Trial_for_Android/Tutorials/BiometricTools/C/obj/local/armeabi/EvaluateFingerQuality' failed
make: *** [/cygdrive/d/MegaMatcher_Embedded_1_2_SDK_Trial_for_Android/Tutorials/BiometricTools/C/obj/local/armeabi/EvaluateFingerQuality] Error 1