06-24-2013 05:12 PM
I preset the DYLD_LIBRARY_PATH with the command "export DYLD_LIBRARY_PATH=/Applications/CLHEP/lib".
If I run the command "echo $DYLD_LIBRARY_PATH" in a terminal, I can get correct information--"/Applications/CLHEP/lib". But if I use "system exec.vi" in the LabVIEW, I get nothing. Is there something wrong?
06-24-2013 05:40 PM
When I run that command in Terminal, I get nothing. The env command does not list any such environment variable.
Running your VI with command line = env gives a similar but not identical list to what running env in Terminal produces. Running echo $<ANY_VARIABLE> gets the value of the variable. For example running env in Terminal lists several variables related to the Terminal application itself. Those do not appear when I run env through your VI. A few variables have different values, PATH for example.
Are you sure that variable exists in the context where System Exec.vi is running?
Lynn
06-24-2013 06:46 PM
If you run "export DYLD_LIBRARY_PATH=/Applications/CLHEP/lib" in a terminal first, you will get "/Application.CLHEP/lib" after you run echo $DYLD_LIBRARY_PATH. I want to use "system exec.vi" to call some c++ programs, which require dynamical library.
06-24-2013 07:25 PM
I see the same things you are seeing. I do not know enough about Unix to offer any useful suggestions about what is happening.
Lynn