taglib with qt-creator

Plasty Grove plasty.grove at gmail.com
Sat Nov 28 08:15:33 CET 2009


Ok, I seem to have got this figured out. We need to include the location of
the header files in the compiler options. Effectively we need to have
something like

g++ something something -I /usr/include/taglib yada yada.

i.e. in the Makefile. We also need to have -ltag included as a link.

Effectively, in the Makefile, this is what it translates to:

CXXFLAGS      = -pipe -I /usr/include/taglib -I /usr/include/taglib-extras
-g -D_REENTRANT -Wall -W $(DEFINES)
LIBS          = $(SUBLIBS)  -L/usr/lib -ltag -lQtGui -lQtCore -lpthread

(note the -ltag in the LIBS variable, taglib-extras in CXXFLAGS might not be
required)

and if you compile it now with make, you'll find everything compiling fine.

In qt-creator, these values can be set by editing the .pro file of your
project and adding in the following variables:

QMAKE_CXXFLAGS += -I /usr/include/taglib -I /usr/include/taglib-extras
QMAKE_LIBS += -ltag

This will make the necessary modifications to the Makefile when you build
the project.

I hope someone finds this useful. It took me a day of googling, searching on
ubuntu forums and a helpful dev at #qt-creator on freenode to figure this
out.

Cheers!
Plasty





On Fri, Nov 27, 2009 at 12:22 AM, Plasty Grove <plasty.grove at gmail.com>wrote:

> Hi all,
>
> I'm unable to figure out how to set the taglib include directory with my
> project in qt-creator. I've tried setting the CXXFLAGS option to -I
> /usr/include/taglib and also tried CFLAGS under the build config. But it's
> just refusing to build. Can someone please help me out with this?
>
> Thanks!
> Plasty
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20091128/2663d8ea/attachment.htm 


More information about the taglib-devel mailing list