How can I set environment variables for Compiler applications from bash / ksh / sh in MATLAB 7.5 (R2007b)?
6 views (last 30 days)
Show older comments
I can run my MATLAB Compiler-generated application from the csh (C) shell using the LD_LIBRARY_PATH and related variables, but SETENV is not available in the bash, ksh, or sh shells on Linux/UNIX/Mac.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The documentation for MATLAB 7.6 (R2008a) has been updated to incorporate the relevant information. For previous product releases, read below for any possible workarounds:
1. For the bash (Bourne Again) and ksh (Korn) shells:
Instead of the csh command SETENV, you can use the bash / ksh equivalent EXPORT command. A command specified as:
csh> setenv VARIABLE value1:value2:...
should be entered as:
bash> export VARIABLE=value1:value2:...
For example, the LD_LIBRARY_PATH definition supplied as:
csh> setenv LD_LIBRARY_PATH <matlabroot>/sys/os/glnxa64:<matlabroot>/bin/glnxa64:...
should be entered as:
bash> export LD_LIBRARY_PATH=<matlabroot>/sys/os/glnxa64:<matlabroot>/bin/glnxa64:...
2. For the sh (Bourne) shell, these commands are similar, but definition and export must be done as separate steps:
VARIABLE=value1:value2:...
export VARIABLE
3. In both cases, the directory lists themselves are unchanged from the csh versions in the documentation.
0 Comments
More Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!