Find Taglib library - installation

Fred Gleason fredg at
Tue Apr 2 19:10:20 BST 2019

On Tue, 2019-04-02 at 15:58 +0000, Christophe Ribal wrote:
> I'm contacting you because I can't find any clear information about
> how to properly install and run Taglib. I've installed it using cmake
> commands (... -> sudo make install ) but now I'm stuck. I can include
> the headers from my IDE, but I have some linking errors as it seems
> that the compiler can't find the compiled library (undefined
> reference to TagLib:: ...)
> I've read the following sentence :
> > Note that TagLib's include install directory must be included in
> > the header include path. Simply adding <taglib/tag.h> will not
> > work.
> But I can't figure out how to do that and whether it's a path to the
> solution or not.

Generally, the easiest way is to use pkg-config(1) to determine the
necessary flags. Thus, the output of:

	pkg-config --cflags taglib

should be added to $CPPFLAGS in your Makefile(s). Likewise, the output

	pkg-config --libs taglib

should be added to $LIBS

If you're using Autoconf/Automake, one easy way to do this is to use
the PKG_CHECK_MODULES() macro. For example, put:

PKG_CHECK_MODULES(TAGLIB,taglib,[],[AC_MSG_ERROR([*** TagLib not found

in your '', then add '@TAGLIB_CFLAGS@' and '@TAGLIB_LIBS@'
to 'AM_CPPFLAGS' and '<target-name>_LDADD' respectively in your


| Frederick F. Gleason, Jr. |             Chief Developer             |
|                           |             Paravel Systems             |
|         A room without books is like a body without a soul.         |
|                                                                     |
|                                                         -- Cicero   |

More information about the taglib-devel mailing list