MATLAB: Do I receive ‘ No Info.plist file in application bundle’ errors when I try to execute the compiled MATLAB code on Maci 64-bit systems on MATLAB 7.9 (R2009b)

MATLAB Compiler

I have compiled my sample MATLAB code using the MATLAB Compiler 4.11 to generate an executable as shown below:
mcc -mv example.m
The compiler creates the executable file in the current folder. When I then try to execute the file from MATLAB as shown:
!./example
I receive the following error:
example[1715:10b] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting
How can I run the compiled executable?

Best Answer

It is not possible to directly run the compiled executable on Maci 64 systems. Instead you must run it using the Application bundle that is created automatically by the MATLAB Compiler.

Another way to execute the compiled application is to use the run_ApplicationName.sh script that is generated by the MATLAB Compiler.

This script takes the Path to Installation directory of the MCR/MATLAB as the input and executes the application (example) as shown below:

!./run_example.sh $MATLABROOT$

where $MATLABROOT$ can be found by typing matlabroot at the MATLAB command prompt. If MATLAB is not installed on the machine, use the root directory of the MCRInstaller.

You can also directly invoke the application from within the Application bundle by using the following command:

!./example.app/Contents/MacOS/example