[Qt-creator] system enviroment variables

Mohammad Mirzadeh mirzadeh at gmail.com
Wed May 9 10:06:22 CEST 2012

> What platform are you on?

Thanks. It works now!

On Tue, May 8, 2012 at 6:15 PM, Lincoln Ramsay <lincoln.ramsay at nokia.com>wrote:

> On 05/09/2012 05:44 AM, ext Mohammad Mirzadeh wrote:
> > I'm having difficulty using my system enviroment variables inside the
> > .pro file.
> What platform are you on?
> > I've tried both
> >
> This evaluates when qmake is run.
> > INCLUDEPATH +=$$system(echo $HEADER_VAR)
> This is roughly equivalent (but it launches a sub-shell rather than just
> querying the environment), it evaluates when qmake is run. I'd recommend
> the first notation over this one.
> > None of them works and Creator cannot parse. Is this possible at all or
> > do I need to copy paste the value of the variables in the .pro file?
> It depends on the platform.
> If you start Creator from a shortcut then it's only going to have access
> to any "user login scope" variables. On Windows, this is anything in the
> Environment tab (you need to restart Creator to pick up changes). On Mac
> OS it's stuff from a .plist file (you need to log off and on to pick up
> changes). On Linux it's ~/.profile (you need to log off and on to pick
> up changes).
> If you start Creator from a console, then the variables set in that
> console should also have an effect.
> You can see what environment Creator is using on the Projects tab, in
> the Build Environment area. You can add custom environment variables
> here but they will be visible to that build only. Make sure you have not
> checked the box to clear the system environment.
> --
> Lincoln Ramsay - Senior Software Engineer
> Qt Development Frameworks, Nokia - http://qt.nokia.com/
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20120509/3fd35978/attachment.html>

More information about the Qt-creator mailing list