LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display the environment variable DYLD_LIBRARY_PATH in a Mac machine

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? 

 

0 Kudos
Message 1 of 4
(4,830 Views)

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

0 Kudos
Message 2 of 4
(4,822 Views)

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. 

0 Kudos
Message 3 of 4
(4,815 Views)

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

0 Kudos
Message 4 of 4
(4,805 Views)