Cannot execute an mcc created standalone executable on another machine

2 ビュー (過去 30 日間)
Li
Li 2014 年 6 月 27 日
回答済み: Chaitra 2014 年 6 月 27 日
I generated an mcc created standalone executable from my m-file on a linux machine 64 bits. The executable runs on this linux machine. Matlab version on this machine is R2013a.
Then I want to run this executable on a mac Version 10.6.8 , Intel Core 2 Duo. This machine has R2012b installed but not MCR installed because it does not recognize the command mcrinstaller.
So I downloaded MCR (for mac 64 bits Matlab 2013a) on the MAC machine and installed it. I also put the following lines in ~/.bashrc:
export DYLD_LIBRARY_PATH='/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/runtime/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/sys/os/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/bin/maci64:/System/Library/Frameworks/JavaVM.framework/JavaVM:/System/Library/Frameworks/JavaVM.framework/Libraries'
export LD_LIBRARY_PATH='/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/runtime/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/sys/os/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/bin/maci64:/System/Library/Frameworks/JavaVM.framework/JavaVM:/System/Library/Frameworks/JavaVM.framework/Libraries'
export XAPPLRESDIR='/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/X11/app-defaults'
Then I sourced ~/.bashrc file.
I tried to run the executable by: ./int_components
But got the error message: bash: ./int_components: cannot execute binary file

採用された回答

Chaitra
Chaitra 2014 年 6 月 27 日
MCR is not platform independent. An application compiled on MATLAB in a LINUX machine can be run only on a LINUX compatible MCR. So if you complied an application on LINUX and tried to run in on an MCR in MAC machine, it will fail to execute.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by