This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
The LD_LIBRARY_PATH environment variable is not valid for use on the Mac OS X. The correct equivalent variable is DYLD_LIBRARY_PATH and it should be set to the directory location of the MATLAB Math and Graphics libraries. You set this environment variable by doing the following shell command prior to running your executable:
Determine what shell you are using:
Look for bash, or tcsh.
If bash:
export DYLD_LIBRARY_PATH=$MGLINSTALLER/bin/mac/:$DYLD_LIBRARY_PATH
If tcsh:
setenv DYLD_LIBRARY_PATH $MGLINSTALLER/bin/mac/:$DYLD_LIBRARY_PATH
where $MGLINSTALLER represents the MGLINSTALLER installation directory.
Best Answer