I'm on a customized Linux distribution.
I'm trying to print from a Qt project file (using message()
directive) an environment variable which is correctly printed in the shell. When qmake runs from the same shell instance, in the printed message is looks like the variable is empty.
I'm using the command message($$(ENVI_VAR))
which according to the Qt website, should get the value of the variable when qmake runs (there is also the $(ENVI_VAR)
syntax which is instead evaluated when the Makefile runs)
What am I missing?
Thanks
Edit:
Actually, not only qmake
, but every process I run, also a script execution, can't see the environment variables. Only the shell can.
I had only defined the variables in the .bashrc
file, but I was missing the export