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
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!