I am struggling to create a program which embeds song lyrics in *.mp3 files using C++ programming for my ongoing project. After searching, I found a library named "TAGLIB" that can process ID3v2.3 standard metadata. According to the LIBTAG installation guide, I ran CMAKE and configured liked this image and this image and build with mingw
C:\Desktop\taglib> mingw32-make
and
C:\Desktop\taglib> mingw32-make install
I got this folder C:\Program Files (x86)\taglib
having contents inside it, including,
bin\libtag.dll
bin\libtag_c.dll
bin\libtag_c.dll
include\*.h files
lib\pkgconfig\taglib.pc
lib\pkgconfig\taglib_c.pc
lib\libtag.a
lib\libtag.dll.a
lib\libtag_c.dll.a
In Codeblocks, I linked libtag.a
, libtag.dll.a
and libtag_c.dll.a
and configured search directories to C:\Program Files (x86)\taglib
and did same to the current project. But compiler gives this type of error for]many times
undefined reference to _imp___ZN6TagLib6StringC1EPKcNS0_4TypeE'|
when I tried to compile example codes provided with library.
Then I used GCC
to compile code. But this time no luck..
C:\Program Files (x86)\taglib>gcc -o f.exe framelist.cpp -L"C:/Program Files (x86)/taglib/lib/" -libta.a -I"C:/Program Files (x86)/taglib/include/taglib"
Getting this error:
`
framelist.cpp:32:10: error: #include expects "FILENAME" or <FILENAME>
#include C:/Program Files (x86)/taglib/include/taglib/id3v2tag.h>
^
framelist.cpp: In function 'int main(int, char**)':
framelist.cpp:59:23: error: invalid use of incomplete type 'class TagLib::ID3v2:
:Tag'
<< id3v2tag->header()->majorVersion()
^
In file included from framelist.cpp:30:0:
C:/Program Files (x86)/taglib/include/taglib/mpegfile.h:37:27: note: forward dec
laration of 'class TagLib::ID3v2::Tag'
namespace ID3v2 { class Tag; class FrameFactory; }
^
framelist.cpp:61:23: error: invalid use of incomplete type 'class TagLib::ID3v2:
:Tag'
<< id3v2tag->header()->revisionNumber()
^
In file included from framelist.cpp:30:0:
C:/Program Files (x86)/taglib/include/taglib/mpegfile.h:37:27: note: forward dec
laration of 'class TagLib::ID3v2::Tag'
namespace ID3v2 { class Tag; class FrameFactory; }
^
framelist.cpp:63:23: error: invalid use of incomplete type 'class TagLib::ID3v2:
:Tag'
<< id3v2tag->header()->tagSize()
^
In file included from framelist.cpp:30:0:
C:/Program Files (x86)/taglib/include/taglib/mpegfile.h:37:27: note: forward dec
laration of 'class TagLib::ID3v2::Tag'
namespace ID3v2 { class Tag; class FrameFactory; }
^
framelist.cpp:67:14: error: 'TagLib::ID3v2::FrameList' has not been declared
ID3v2::FrameList::ConstIterator it = id3v2tag->frameList().begin();
^
framelist.cpp:68:13: error: 'it' was not declared in this scope
for(; it != id3v2tag->frameList().end(); it++)
^
framelist.cpp:68:27: error: invalid use of incomplete type 'class TagLib::ID3v2:
:Tag'
for(; it != id3v2tag->frameList().end(); it++)
^
In file included from framelist.cpp:30:0:
C:/Program Files (x86)/taglib/include/taglib/mpegfile.h:37:27: note: forward dec
laration of 'class TagLib::ID3v2::Tag'
namespace ID3v2 { class Tag; class FrameFactory; }
^
`
As you can understand, I'm fairly new to adding external library, help me figuring out, How can I properly install "LIBTAG" to start coding in Codeblocks.