Standalone Applications

Create standalone applications from MATLAB® functions

Create a standalone application if you want to run MATLAB code on target machines that do not have MATLAB installed. Compile the MATLAB code by using the Application Compiler app or by running the mcc command.

To run standalone applications, install the MATLAB Runtime. For more information, see Install and Configure the MATLAB Runtime. Standalone applications run on Windows, Linux®, and Mac.

Apps

Application CompilerPackage MATLAB programs for deployment as standalone applications

Functions

applicationCompilerBuild and package functions into standalone applications
mccCompile MATLAB functions for deployment
deploytoolCompile and package functions for external deployment
isdeployedDetermine whether code is running in deployed or MATLAB mode
ismccTest if code is running during compilation process (using mcc)
mcrversionDetermine version of installed MATLAB Runtime
%#functionPragma to help MATLAB Compiler locate functions called through feval, eval, Handle Graphics callback, or objects loaded from MAT-files

Examples and How To

Create Standalone Applications

Package Standalone Application with Application Compiler App

The Standalone Compiler App is a graphical tool for compiling and packaging standalone applications.

Create Standalone Application from Command Line

Using the command line compiler to create standalone applications.

Customize Applications

Customize the Installer

How to customize the look and feel of the installer generated by the compiler app

Manage Required Files in Compiler Project

How to ensure that the compiler includes all of the required MATLAB files when generating the application

Specify Files to Install with Application

How to include extra files to be installed along with the application

Customize Application Runtime Settings

How to specify some specific runtime behaviors of the generated application

Manage Support Packages

The compiler attempts to package any support packages required by an application.

Deploy Standalone Application on Network Drive (Windows Only)

Describes the steps you must follow to run MATLAB Compiler™ generated applications from a network drive

MATLAB Data Files in Compiled Applications

Using MATLAB data files in compiled applications

Parallel Computing

Use Parallel Computing Toolbox in Deployed Applications

Explains the additional steps required to deploy code that uses the Parallel Computing Toolbox™

Mac OS X

Integrate Application with Mac OS X Finder

Macintosh graphical applications, launched through the Mac OS X finder utility, require additional configuration if MATLAB software or the MATLAB Runtime were not installed in default locations.

Concepts

Differences Between Compiler Apps and Command Line

You perform the same functions using either the compiler apps or the mcc command-line interface.

MATLAB Compiler Limitations

Restrictions regarding what can be compiled

MATLAB Functions That Cannot Be Compiled

Functions not able to be compiled with MATLAB Compiler or MATLAB Compiler SDK™

Write Deployable MATLAB Code

Writing MATLAB code that is sure to compile

Standalone Applications and Arguments

How to pass arguments to standalone applications and run applications that use arguments

Calling Shared Libraries in Deployed Applications

The loadlibrary function in MATLAB allows you to load shared library into MATLAB.

Dependency Analysis

Basics about the dependency analysis function

Dependency Analysis Function and User Interaction with the Compilation Path

MATLAB Compiler uses the MATLAB search path to analyze dependencies.

MEX-Files, DLLs, or Shared Libraries

How the dependency function handles MEX-files, DLLs, and shared libraries

Troubleshooting

Compilation Failures

You typically compile your MATLAB code on a development machine, test the resulting executable on that machine, and deploy the executable and MATLAB Runtime to a test or customer machine without MATLAB.

Testing Failures

After you have successfully compiled your application, the next step is to test it on a development machine and deploy it on a target machine.

Investigate Deployed Application Failures

Process to determine application failure at the end-user

Problems Setting MATLAB Runtime Paths

Issues related to setting the MATLAB Runtime path

Error and Warning Messages

This appendix lists and describes error messages and warnings generated by the compiler.

Was this topic helpful?