PDA

View Full Version : How to use environmental variables when import non Qt project



prasad_N
19th December 2015, 18:17
I have imported my non Qt project (plain c++ project) into Qt creator, So i have provided enough info in .config, .files & .includes.
I have few environmental variables set in my project from where I have some of my libraries so in .includes I wanted to use this variables but foe some reason this env variables are not working.

Ex: /usr/myprj/mylibs/QtLibs/includes/QtCore - absolute path is working fine & Qt creator able to recognize my header files
But, $$MY_QT_LIB/QtCore (where MY_QT_LIB is environmental variable & set to /usr/myprj/mylibs/QtLibs/includes/) , Now my Qt creator is not able to recognize my header files in project.

(tried $MY_QT_LIB/QtCore also, did n't work).

Do I need to configure this environmental variables somewhere in Qt creator or will they get set automatically when I launch Qt creator from same terminal where my environment got set ???
If we need to configure this variables in Qt creator, please tell me the location.

Environment : Linux, Qt 3.2.1

Thanks alot :-)

prasad_N
23rd December 2015, 05:28
$$(MY_QT_LIB)/QtCore did the trick. should enclose env variables with () & Qt creator is taking all the environmental variables of the shell from where we launch Qt creator.

Thanks.