I was trying to compile my own program using TagLib (installed via instructions in their readme from the github repo). For sanity, I tried compiling one of their included examples, which gave me the same errors.
Command run:
g++ -g taglib/examples/tagreader.cpp `taglib-config --cflags --libs` -o ~/test.out -ltag_c
Output from command:
/tmp/ccvhk8Lc.o: In function `main':
tagreader.cpp:(.text.startup+0x609): undefined reference to `TagLib::File::properties() const'
tagreader.cpp:(.text.startup+0xb09): undefined reference to `TagLib::PropertyMap::~PropertyMap()'
tagreader.cpp:(.text.startup+0x110e): undefined reference to `TagLib::PropertyMap::~PropertyMap()'
collect2: error: ld returned 1 exit status
The output from taglib-config --cflags --libs
is:
-I/usr/local/include/taglib -L/usr/local/lib -ltag
According to everything I've read, people have gotten their programs using the above commands with no issue. Did I compile TagLib wrong? I have verified that both tpropertymap.h
and fileref.h
are located in /usr/local/include/taglib
, so now I'm at a loss as to why it is failing. Any help would be much appreciated!