PDA

View Full Version : Linking Third party Libraries



jsmith
13th October 2009, 06:19
Hi,
I am using Qt creator and I have to include .h and lib files provided by third party. Now i am including these file paths in Makefile. But problem is every time i have to include them in Make file. Suppose i dont want to include them manually. Is there any provision to do automatically including these paths in Makefile.

Please help me.
Thanks in advance.

yogeshgokul
13th October 2009, 07:18
Is there any provision to do automatically including these paths in Makefile.
Yes.
You should not do anything in makefiles, use .pro files instead. You need to set paths and all in .pro file and when you run the qmake, make files will be generated with given options.
Your .pro file should look like this:


INCLUDEPATH += 3rd/Party/Lib/Path/Headers
LIBS += -L3rd/Party/Lib/Path
LIBS += -l3rdPartyLib1 -l3rdPartyLib2