Additional gcc options in a qmake project

Patrick Noffke pnoffke at bigpond.com
Sat Mar 18 00:25:46 GMT 2006


Michael Gruetzner wrote:
> Hello,
>
> I've created a qmake project with kdevelop and I need to link my project
> against some additional libraries. Therefore I have to add some gcc 
> options
> ( -l). How can I do this with a qmake project? In a 'ordinary' KDE 
> project I can
> add any gcc option using the 'project options' dialog but with qmake 
> projects
> this is not possible.
>
Edit your .pro (qmake project) file, which should have been created by 
kdevelop.  Add a line like:

LIBS += -L/path/to/yourlib -lyourlib

See the qmake reference manual for more details.

After you edit the .pro file, have a look at what changed in kdevelop 
(using the qmake manager, NOT the project options dialog).  From then on 
you should be able to make the same changes from within kdevelop.  Of 
course you can just try editing the project straight from the qmake 
manager -- just check your .pro file to see what changed.

You have to run qmake again to regenerate your Makefile with the new 
LIBS variable.  I think it's done automatically when you rebuild your 
project, but you can right click on your project (within qmake manager) 
to force a run of qmake if you need.

Pat

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list