Run app created in Matlab on Mac

조회 수: 15 (최근 30일)
Maxim
Maxim 2011년 8월 9일
편집: Sagar Zade 2021년 1월 29일
Good day! Could anyone please tell me how to run application created in Matlab on Mac? My situation is:
I don't have Matlab on Mac, but I've installed MCR, and I can't understand lines in readme.txt file:
setenv DYLD_LIBRARY_PATH
<mcr_root>/v711/runtime/maci64:
<mcr_root>/v711/sys/os/maci64:
<mcr_root>/v711/bin/maci64:
/System/Library/Frameworks/JavaVM.framework/JavaVM:
/System/Library/Frameworks/JavaVM.framework/Libraries
setenv XAPPLRESDIR <mcr_root>/v711/X11/app-defaults
So what should I do according these lines???

채택된 답변

Chirag Gupta
Chirag Gupta 2011년 8월 9일
You need to set two environment variables to the following.
DYLD_LIBRARY_PATH and XAPPLRESDIR. The mcr_root is the location where you installed the MCR.
Open a Terminal: Execute the commands above (replacing mcr_root with actual location), navigate to where you have the Matlab app, and run it.
  댓글 수: 3
Titus Edelhofer
Titus Edelhofer 2011년 8월 11일
your google tells you the right thing to do: you could just enter
export DYLD_LIBRARY_PATH = <mcr_root>/v711/runtime/maci64:<mcr_root>/ ...
export XAPPLRESDIR = ...
Titus
Maxim
Maxim 2011년 8월 12일
Thanks a lot for explanation, I tried to do it, as you said, in terminal I wrote (I have installed MCR in the folder "mcr" on the Desktop):
export DYLD_LIBRARY_PATH=/Users/julialavrentyeva/Desktop/mcr/v711/runtime/maci64:/Users/julialavrentyeva/Desktop/mcr/v711/sys/os/maci64:/Users/julialavrentyeva/Desktop/mcr//v711/bin/maci64:/System/Library/Frameworks/JavaVM.framework/JavaVM:/System/Library/Frameworks/JavaVM.framework/Libraries
then i press Enter and wrote:
export XAPPLRESDIR =/Users/julialavrentyeva/Desktop/mcr/v711/X11/app-defaults
after pressing Enter I changed the directory where Matlab app is saved:
cd /Users/julialavrentyeva/Documents/MATLAB/Dip
after this I want to run the app, so I have written (Dip it is a name of the app):
open Dip
But the answer form Terminal is:
imac-julia-lavrentyeva:~ julialavrentyeva$ /Users/julialavrentyeva/Documents/MATLAB/Dip/Dip ; exit;
dyld: Library not loaded: @loader_path/libmwmclmcrrt.7.11.dylib
Referenced from: /Users/julialavrentyeva/Documents/MATLAB/Dip/Dip
Reason: image not found
Trace/BPT trap
logout
Could you suppose where I am wrong???

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Jerome Lecoq
Jerome Lecoq 2013년 1월 4일
This post is very good demonstration of how terrible the deployment process is on the mac. We SHOULD be able to just click on it (like in the windows plateform).

Maxim
Maxim 2011년 8월 17일
I don't know how but now this app works :))
But each time when I want to run this I have to open Terminal and type:
export DYLD_LIBRARY_PATH=/Users/julialavrentyeva/Desktop/mcr/v711/runtime/maci64:/Users/julialavrentyeva/Desktop/mcr/v711/sys/os/maci64:/Users/julialavrentyeva/Desktop/mcr//v711/bin/maci64:/System/Library/Frameworks/JavaVM.framework/JavaVM:/System/Library/Frameworks/JavaVM.framework/Libraries
export XAPPLRESDIR =/Users/julialavrentyeva/Desktop/mcr/v711/X11/app-defaults
cd /Users/julialavrentyeva/Desktop/matlApp
open Dip.app
If I close Dip.app and Terminal, to run Dip.app again I have to type previous lines again... It's good that this app can work, but does anybody know how to run this app in usual way - just click it?
  댓글 수: 2
Chirag Gupta
Chirag Gupta 2011년 8월 17일
In your root you will most probably have an hidden .bashrc file or a .profile file. You can edit this file and set the environment variables there. This will ensure that these variables persist
Maxim
Maxim 2011년 8월 18일
Thanks for your comment!
There is only hidden file ".DS_Store" in the directory with Dip.app. I have found hidden file ".bash_profile" - so should I add lines like:
# Setting PATH for MCR
DYLD_LIBRARY_PATH=/Users/julialavrentyeva/Desktop/mcr/v711/runtime/maci64:/Users/julialavrentyeva/Desktop/mcr/v711/sys/os/maci64:/Users/julialavrentyeva/Desktop/mcr//v711/bin/maci64:/System/Library/Frameworks/JavaVM.framework/JavaVM:/System/Library/Frameworks/JavaVM.framework/Libraries
export DYLD_LIBRARY_PATH
XAPPLRESDIR=/Users/julialavrentyeva/Desktop/mcr/v711/X11/app-defaults
export XAPPLRESDIR
?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by