Android ndk неопределенная ссылка на Android :: RefBase :: incStrong

Ошибка компоновщика при попытке использовать классы, определенные в stagefright. Я пытаюсь использовать MediaExtractor,

$ /cygdrive/d/Android/tool_set/android-ndk-r8e-windows-x86/android-ndk-r8e/ndk-
build
/cygdrive/d/Android/tool_set/android-ndk-r8e-windows-x86/android-ndk-r8e/build/c
ore/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is lar
ger than android:minSdkVersion 8 in ./AndroidManifest.xml
Compile++ thumb  : mediaextractor <= mediaextractor.cpp
SharedLibrary  : libmediaextractor.so
D:/Android/tool_set/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-l
inux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/.
./../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/mediaextra
ctor/mediaextractor/mediaextractor.o: in function Java_com_example_omxtry_MediaE
xtractorActivity_mediaExtractorCreate(_JNIEnv*, _jclass*):jni/mediaextractor/and
roid-headers-gingerbread/frameworks/base/include/utils/RefBase.h:366: error: und
efined reference to 'android::RefBase::incStrong(void const*) const'
D:/Android/tool_set/android-ndk-r8e-windows-x86/android-ndk-r8e/toolchains/arm-l
inux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/.
./../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/mediaextra
ctor/mediaextractor/mediaextractor.o: in function Java_com_example_omxtry_MediaE
xtractorActivity_mediaExtractorCreate(_JNIEnv*, _jclass*):jni/mediaextractor/and
roid-headers-gingerbread/frameworks/base/include/utils/RefBase.h:379: error: und
efined reference to 'android::RefBase::decStrong(void const*) const'
collect2: ld returned 1 exit status
m

ака: * [obj / local / armeabi / libmediaextractor.so] Ошибка 1

Мой файл Android.mk

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
SRC_PATH := $(LOCAL_PATH)/../mediaextractor
TARGET_PLATFORM = android-9
LOCAL_MODULE    := mediaextractor
LOCAL_SRC_FILES := mediaextractor/mediaextractor.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/mediaextractor/android-headers-gingerbread/frameworks/base/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/mediaextractor/android-headers-gingerbread/system/core/include
LOCAL_LDFLAGS := -L$(LOCAL_PATH)/mediaextractor/android-headers-gingerbread/libs/
LOCAL_LDLIBS    += -llog -ldl
LOCAL_LDLIBS    += -landroid -lstdc++
LOCAL_LDLIBS    += -lstagefright #-lutils
LOCAL_CFLAGS    += -UNDEBUG
include $(BUILD_SHARED_LIBRARY)

Как решить эту проблему?

Также мне нужно указать LOCAL_LDLIBS += -landroid -lstdc++ ??

2

Решение

Задача ещё не решена.

Другие решения


По вопросам рекламы [email protected]