environment variable in linux gcc

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
learner
Posts: 5
Joined: Thu 23 May 2013, 10:11

environment variable in linux gcc

#1 Post by learner »

Hi,
I am able to get environment variable using getenv function in gcc.But when tried to change the value using setenv function, its value is changed as seen after calling getenv function. when try to seen the value of environment variable in command terminal in ubuntu. it is not showing any change. Can any one tell me, how can i change environment variable in linux gcc.


----------------
Linux Learner

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

Re: environment variable in linux gcc

#2 Post by PANZERKOPF »

learner wrote:Hi,
Can any one tell me, how can i change environment variable in linux gcc.
I presume You mean "C" , GCC is just a compiler.
Seems that problem happens because an environment variable set by some process is not visible by parent process.
It is not possible to export variable to the parent process.
SUUM CUIQUE.

Post Reply