Taglib for Android

丶灬走出姿态 提交于 2019-12-03 04:46:43

I think you might need -ltag_c in there somewhere

  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

The reason you can't access taglib_set_strings_unicode is because of how TAGLIB_C_EXPORT is defined in tag_c.h.

#if defined(_WIN32) || defined(_WIN64)
#ifdef MAKE_TAGLIB_C_LIB
#define TAGLIB_C_EXPORT __declspec(dllexport)
#else
#define TAGLIB_C_EXPORT __declspec(dllimport)
#endif
#elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 1)
#define TAGLIB_C_EXPORT __attribute__ ((visibility("default")))
#else
#define TAGLIB_C_EXPORT
#endif
...
typedef struct { int dummy; } TagLib_File;
typedef struct { int dummy; } TagLib_Tag;
typedef struct { int dummy; } TagLib_AudioProperties;
...
TAGLIB_C_EXPORT void taglib_set_strings_unicode(BOOL unicode);
...

To get the job done I would hack tag_c.h at line 43 to define the proper visibility rules:

#define TAGLIB_C_EXPORT __attribute__ ((visibility("default")))

If this works, you might open a bug at taglib and link back to this question.

LOCAL_STATIC_LIBRARY := taglibtest

You are using static library, not shared. The directive to use shared one confuses the build environment.

You need to link both tag_c.h.o and taglibwav.o :

gcc -o program tag_c.h taglibwav.c
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!