我正在尝试Taglib
为 Android 编译。我已经
Taglib
从这里下载了最新版本。在为构建编译它之后,arm-linux
我已经成功地将它导入到我的应用程序中,但是当我尝试从中调用任何函数时,tag_c.h
我收到以下错误:
SharedLibrary : taglibwav.so
/home/test/workspacenew/Androidtaglibexample/obj/local/armeabi/
objs/squared/taglibwav.o: In function
`Java_com_android_androidtag_WavFileDetails_taglibwav':
/home/test/workspacenew/Androidtaglibexample/jni/taglibwav.c:30:
undefined reference to `taglib_set_strings_unicode'
collect2: ld returned 1 exit status
make: *** [/home/test/workspacenew/Androidtaglibexample/obj/
local/armeabi/taglibwav.so] Error 1
应用配置信息为:
标签库 ./configure :-
./configure CC="/home/hcl/taglib/taglib/toolchain/bin/arm-linux-androideabi-gcc"\
--host="arm-linux" \
--build="arm" \
--enable-static="no" \
--enable-shared="yes" \
--prefix="/home/test/workspacenew/Androidtaglibexample/jni/testtaglib/"\
安卓.mk:-
LOCAL_PATH := $(call my-dir)
#declare the prebuilt library
include $(CLEAR_VARS)
LOCAL_MODULE := taglibtest
LOCAL_SRC_FILES := testtaglib/lib/libtag.a
LOCAL_EXPORT_C_INCLUDES := testtaglib/include/taglib/
LOCAL_PRELINK_MODULE := true
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
include $(call all-subdir-makefiles)
LOCAL_MODULE := taglibwav
LOCAL_SRC_FILES := taglibwav.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/testtaglib/include/taglib/
LOCAL_SHARED_LIBRARY := taglibtest
LOCAL_LDLIBS := -llog -ljnigraphics -lz -lm -L$(SYSROOT)/usr/lib -llog
include $(BUILD_SHARED_LIBRARY)
应用程序.mk:-
APP_ABI :=armeabi
APP_STL:=stlport_static
taglibwav.c :-
#include <jni.h>
#include <tag_c.h>
#include <android/log.h>
#ifndef FALSE
#define FALSE 0
#endif
.......
.......
JNIEXPORT void JNICALL Java_com_android_androidtag_WavFileDetails_taglibwav
(JNIEnv * ev, jclass jc){
int i;
int seconds;
int minutes;
TagLib_File *file; //<< accessed form tag_c.h : OK
TagLib_Tag *tag; //<< accessed form tag_c.h : OK
const TagLib_AudioProperties *properties; //<<accessed form tag_c.h : OK
taglib_set_strings_unicode(FALSE);//<<accessed form tag_c.h : GETTING ERROR
}
....
....
Android NDK 版本:- Android-Ndk-r7c
请指导我正确的方向来解决我做错的事情