| | |
Regarding Env variables.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2007
Posts: 35
Reputation:
Solved Threads: 0
I am calling one c++ exe from my unix shell script, i am trying to set the env variables using putenv() thru my c++ code. Now i want to use these varibles in my new exe which is there in the same shell script(set by using the previous exe ) , but i am not able to access those varibles..
Please help me out in this.
flow of the script. :
one c++ exe (putenv("ABC=a") variable)
|
(when i am doing echo $ABC in the script i am not able to get its value and also i am not able to getenv this variable value)
|
V
second c++ exe of different version compiler (Here i want to get the already set env variables.)
I am not able to do that
Please help me out in this.
flow of the script. :
one c++ exe (putenv("ABC=a") variable)
|
(when i am doing echo $ABC in the script i am not able to get its value and also i am not able to getenv this variable value)
|
V
second c++ exe of different version compiler (Here i want to get the already set env variables.)
I am not able to do that
>> am not able to do that
Yup -- you found out the hard way that it can't be done. One solution is to write the variables to a file or shared memory so that other programs can read them.
Yup -- you found out the hard way that it can't be done. One solution is to write the variables to a file or shared memory so that other programs can read them.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- multiple variables in a mod_rewrite URL string (Linux Servers and Apache)
- How to access the system environment variables in windows (Perl)
- Problem with variables in Windows shell script (Windows NT / 2000 / XP)
- how to get pass url variables from one page to another page with out knowing them? (ColdFusion)
- Retreiving variables from a sql query into a form (PHP)
- Problem Unsetting Variables? (PHP)
- Launching an application from a thread (C++)
- More newbie problems - VBScript and Env variables (Visual Basic 4 / 5 / 6)
Other Threads in the C++ Forum
- Previous Thread: Help with mfc classes pleeeease
- Next Thread: deleting dynamic memory
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






