Using Taglib library with Qt
Lukáš Lalinský
lalinsky at gmail.com
Tue Nov 23 21:00:43 CET 2010
On Tue, Nov 23, 2010 at 8:51 PM, eswar <eswar.com at gmail.com> wrote:
> Hi,
>
> I am trying to use taglib inside a Qt application. I have built the
> library using cmake(mingw) on a windows machine. But, when I am trying
> to use the library I get the following linker errors. I have included
> the library in the pro file.
>
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:36:
> undefined reference to
> `_imp___ZN6TagLib7FileRefC1ENS_8FileNameEbNS_15AudioProperties9ReadStyleE'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:37:
> undefined reference to `_imp___ZNK6TagLib7FileRef6isNullEv'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:37:
> undefined reference to `_imp___ZNK6TagLib7FileRef3tagEv'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:38:
> undefined reference to `_imp___ZNK6TagLib7FileRef3tagEv'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:39:
> undefined reference to `_imp___ZNK6TagLib7FileRef6isNullEv'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:39:
> undefined reference to `_imp___ZNK6TagLib7FileRef15audioPropertiesEv'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:40:
> undefined reference to `_imp___ZNK6TagLib7FileRef15audioPropertiesEv'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:47:
> undefined reference to `_imp___ZN6TagLib7FileRefD1Ev'
> debug/readmeta.o:F:\workspace\qt\projects\AlbumArt-build-desktop/../AlbumArt/readmeta.cpp:47:
> undefined reference to `_imp___ZN6TagLib7FileRefD1Ev'
>
> Would be thankful if anyone can figure out what I am doing wrong here.
My first guess would be that you've built a static version of TagLib,
but the default include files expect a DLL version. If you indeed have
a static version of TagLib, you need to define the TAGLIB_STATIC
macro somewhere in your build system. That will
Lukas
More information about the taglib-devel
mailing list