Package MATLAB Functions
Before you can integrate MATLAB functions into external applications, you need to package them for the target language. MATLAB Compiler SDK™ includes two apps and a command-line compiler for this purpose. The apps guide you in specifying functions to package and in creating an installer. Target-language developers install the compiled code on the development system, along with the MATLAB Runtime, which is necessary to run the code. At the command-line, you can package the MATLAB functions into a binary package the target language developer uses in developing their applications.
Apps
Library Compiler | Package MATLAB programs for deployment as shared libraries and components |
Functions
Examples and How To
C/C++
- Install an ANSI C or C++ Compiler
Installing a supported C/C++ compiler - Create a C Shared Library with MATLAB Code
Learn how to create a C shared library. - Generate a C++ mwArray API Shared Library and Build a C++ Application
Create a C++ mwArray API shared library from MATLAB code and implement it with sample C++ driver code. - Generate a C++ MATLAB Data API Shared Library and Build a C++ Application
Create a C++ MATLAB Data API shared library from MATLAB code and implement it with sample C++ driver code. - Create C/C++ Shared Libraries from Command Line
Use the command-line compiler to create C/C++ shared libraries. - Distribute C/C++ Shared Libraries to Application Developers
Distribute the following to the application developer integrating the shared library:
.NET
- Generate .NET Assembly and Build .NET Application
Create a .NET assembly in MATLAB and implement it with sample C# code. - Package .NET Assemblies from Command Line
Using themcc
command line to build your assembly - Distribute .NET Assemblies to Application Developers
Distribute the following to the application developer integrating the .NET assembly:
Java
- Configure Your Java Environment
Configuring the Java® environment for compilation of MATLAB code and development of Java applications - Generate Java Package and Build Java Application
Create a Java package in MATLAB and implement it with sample Java code. - Package Java Applications from Command Line
Using the command-line compiler to create Java applications. - Map Functions to Java Class Methods
Mapping MATLAB functions to Java classes - Distribute Java Applications to Application Developers
Distribute the following to the application developer integrating the application:
Python
- Generate a Python Package and Build a Python Application
Create a Python® package in MATLAB and implement it with sample Python driver code. - Package Python Applications from Command Line
MATLAB Compiler SDK cannot package MATLAB code that uses the MATLAB Python interface. - Distribute Python Applications to Application Developers
Distribute the following to the application developer integrating the application:
MATLAB Production Server
- Create Deployable Archive for MATLAB Production Server
Learn how to package a MATLAB function into a deployable archive for MATLAB Production Server™. - Package Deployable Archives from Command Line
Package MATLAB applications into deployable archives from the command line using themcc
command. - Create and Install a Deployable Archive with Excel Integration for MATLAB Production Server
Learn how to create a deployable archive with Excel® integration for MATLAB Production Server using a MATLAB function.
COM
- Create a Generic COM Component with MATLAB Code
Learn how to create a generic COM component. - Package COM Components from Command Line
Using themcc
command line to build COM components - Distribute COM Components to Application Developers
Distribute the following to the application developer integrating the component:The Library Compiler app generates an installer that packages all of the binary artifacts required for distributing a COM component.
Customization
- Customize an Application
How to customize the look and feel of the installer generated by the compiler app. - Manage Support Packages
Including support packages when packaging MATLAB applications. - Simplify Compilation Using Macros
Information on macros and how they can simplify your work - Invoke MATLAB Build Options
Using path name, bundles, and wrapper files to build your MATLAB code
Concepts
- Files Generated After Packaging MATLAB Functions
Descriptions for files generated after packaging MATLAB functions.
- How Does MATLAB Deploy Functions?
Learn the steps performed by MATLAB Compiler™ for deployment.
- Write Deployable MATLAB Code
Write flexible MATLAB code that can be packaged and deployed.
- State-Dependent Functions
Dealing with MATLAB functions that carry state.
- MATLAB Runtime Component Cache and Deployable Archive Embedding
How to override the default deployable archive embedding behavior and how to use MATLAB Runtime Component Cache
- Using MATLAB Runtime User Data Interface
Access MATLAB Runtime data.
- Display MATLAB Runtime Initialization Messages
Create console messages for end users.
- Functions Not Supported for Compilation by MATLAB Compiler and MATLAB Compiler SDK
Functions not able to be compiled with MATLAB Compiler or MATLAB Compiler SDK
- Limitations
MATLAB Compiler has limitations regarding what can be compiled.