Cannot execute an mcc created standalone executable on another machine

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Downloads 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by