[问题] Android.mk 导致 undefined reference

楼主: kinmogi (去去去...)   2015-03-18 09:34:19
各位大大们,我在写 jni,利用 NDK去 build
我已经有第三方静态库(.a),要去build动态库(.so)
一直出现 undefined reference to "xxxclass::xxx()"
看了很多网络的资料,还是解不出来,
以下是我 android.mk源码
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libstatic
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libtk32x.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/head
include $(PREBUILT_STATIC_LIBRARY)
#========================
include $(CLEAR_VARS)
LOCAL_MODULE := JniDemo
LOCAL_SRC_FILES := com_example_jimyu_facedecunderjni_RunJNI.cpp Utility.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := libstatic
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
#===========
error message:
C:\Users\JimYu\AndroidStudioProjects\FaceDecUnderJni\app/src/main/jni/
arm64-v8a/libtk32x.a(tk32x.o): In function `GetLostCounterLimit':
/Users/max/AndroidStudioProjects/FaceTracker/app/src/main/jni/tk32x.cpp:657
: undefined reference to `CTracker::GetLostCount()'
我快哭了,麻烦各位高手了 QQ
作者: mshockwave (夏克维夫)   2015-03-18 13:24:00
你第一个module名字不用加lib但我想那不是问题所在(?
楼主: kinmogi (去去去...)   2015-03-18 13:36:00
感谢你,结果还是一样,我用的是 c++ 的 lib QQ

Links booklink

Contact Us: admin [ a t ] ucptt.com