| | |
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 based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






