View Full Version : qmake default includes
Gopala Krishna
15th July 2007, 21:13
I recently installed qt-4.3 open source binary on windows xp. Whenever i do qmake -project && qmake && make , i get compilation failure due to wrong/missing bits directory in the default include list.
Adding the appropriate include directory to the include list in the .pro file solves the problem.
Is there anyway so that i can inform qmake to add this directory to include list as default while generating project files?
Which include directory are we talking about? It is advisable to run "qmake -project" only once at the beginning of the project, not every time while building the project.
Gopala Krishna
16th July 2007, 18:08
The include directory which i add externally is like this
INCLUDEPATH += d:\MinGWStudio\MinGW\include\c++\3.3.1\mingw32
I guess i need to do this due to some wrong configuration of mingw while installing. But otherwise everything is ok.
I won't do qmake -project every time. Actually i create some qt test programs and test using qmake. Always firing up notepad and editing pro file to just test program is irritating. Also i write new test programs often.
So is there anyway i can do , so that file generated by qmake contains this include directory by default ?
Try adding it to <QTDIR>/mkspecs/win32-g++/qmake.conf.
Gopala Krishna
17th July 2007, 21:31
It worked. Thanks. One small confirmation
I think it shd be INCLUDEPATH = reqd dir instead of INCLUDEPATH += since the variable might not have been declared when qmake.conf is parsed. Am i right ?
I think you can use "+=" on a non-existent variable and that's the way I would use it just to be sure not to overwrite anything that could have been set already.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.