I need Qt Creator to store some global include paths that will apply to all projects. Is there currently any way to do this?
The reason I am trying to do this is because on Windows, there is no standard location for include files - so the only way to add an include path is to specify the absolute path to the folder in the .pro
file. This becomes a nightmare when the .pro
file is checked into version control.
Is there a better开发者_JAVA技巧 way?
You can set CPATH & friends environment variables so mingw will use them to search include files:
http://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html#Environment-Variables
I'm not sure how "recommended" this is but you can add an INCLUDEPATH +=
to qmake.conf
in <qt install directory>\qt\mkspecs\default
精彩评论