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 CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by