How to Run a Generated Executable Outside MATLAB

To run your generated standalone executable application in Shell, you need to set the environment variables as follows:

PlatformCommand
Macsetenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH: $MATLABROOT/bin/maci64 (csh/tcsh)

export DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH: $MATLABROOT/bin/maci64 (Bash)

Linuxsetenv LD_LIBRARY_PATH $LD_LIBRARY_PATH: $MATLABROOT/bin/glnxa64 (csh/tcsh)

export LD_LIBRARY_PATH $LD_LIBRARY_PATH: $MATLABROOT/bin/glnxa64 (Bash)

Windowsset PATH = $MATLABROOT\bin\win32;%PATH%

set PATH = $MATLABROOT\bin\win64;%PATH%

Was this topic helpful?