How to link libraries like qxt or qwt?
-
Hi folks,
I'm wondering how do Qxt and Qwt build their libraries so we can include later on like this
@CONFIG += qxt
QXT = core gui@I'm looking at the sources but I'm getting lost! Thanks.
Edit: I'm diving into it and found about .prf files and the QtDir/mkspecs/features folder. What should I do when compiling my lib to place the .prf file so a user compiling my lib can use it in CONFIG?
-
Hi,
the prf files is the secret you are searching. Look in e.g. /usr/local/qwt-6.1.0-svn/features
-
You're welcome !
You can find some information in qmake's documentation under "qmake Advance Usage" chapter "Adding New Configuration Features"
-
I've finally got it working, but I think I've found a bug:
when I compile using Qt Creator, the make instruction doesn't include the headers and libs I've declared in my prf file.When I do inside the terminal (qmake & make) I can see the include headers and libs, and effectively builds fine.
Should I report a bug?
-
Did you update an environment variable on the console ? If so, the environment in QtCreator might be outdated so it doesn't reflect what you did
-
Naughty phantom Qt install... :-D
Glad you found out !