开发者

Is there a way to add an include path to Qt Creator that applies globally to all projects?

开发者 https://www.devze.com 2023-02-25 06:39 出处:网络
I need Qt Creator to store some global include paths that will apply to all projects. Is there currently any way to do this?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消