Distribute MATLAB Compiler SDK Files to Application Developers
After you create a component using MATLAB® Compiler SDK™, distribute files and integrate them in an application in the target language.
The Compiler apps optionally generate an installer that packages all of the binary
artifacts required for distributing a compiled component. The installer is located in the
package
folder of the compiler project. You can also generate an
installer using the compiler.package.installer
function. If you do not create an installer,
manually distribute the set of files required to integrate the component according to the
component type. For more details on the available methods to package functions, see Choose Deployment Option.
Depending on the deployment target, there may be additional steps required before you can
run the application. For instance, if you build a C++ shared library and then write code for
a C++ application, you can compile the C++ application executable using
mbuild
. Files generated after packaging are not included in the
installer generated by the Compiler app. You can manually distribute the executable along
with MATLAB Runtime or include the executable in an installer using the
AdditionalFiles
option of the compiler.package.installer
function.
In order to run the application, the target machine must have access to MATLAB Runtime that matches the version of MATLAB used to compile the component, at the same update level or newer. For details, see About MATLAB Runtime.
Distribute COM Components
Distribute the following files to integrate a component in an application.
packageName
.dll
— COM component_install.bat
— script that registers the component (to register manually, see Register COM Component)Function signatures of the deployed MATLAB functions (for details, see Customize Code Suggestions and Completions)
Distribute C/C++ Shared Libraries
Distribute the following files to integrate a C/C++ shared library in an application.
One of the following:
libraryName
.lib
/.dylib
/.so
—mwArray
API shared librarylibraryName
.ctf
— MATLAB Data API deployable archive
libraryName
.h
/.hpp
— header fileFunction signatures of the deployed MATLAB functions (for details, see Customize Code Suggestions and Completions)
Distribute Java Packages
Distribute the following files to integrate a Java® package in an application.
packageName
.jar
— Java packageFunction signatures of the deployed MATLAB functions (for details, see Customize Code Suggestions and Completions)
Include directions for adding the required JAR files to the Java CLASSPATH.
At a minimum, the CLASSPATH must include:
mcrroot
/toolbox/javabuilder/jar/javabuilder.jarGenerated Java package
JAR files for the application
Distribute .NET Assemblies
Distribute the following files to integrate a .NET assembly in an application.
One of the following:
libraryName
.dll
—MWArray
API assemblylibraryName
.ctf
— MATLAB Data API deployable archive
Function signatures of the deployed MATLAB functions (for details, see Customize Code Suggestions and Completions)
assemblyName
.xml
— documentation files (optional)assemblyName
.pdb
— program database file containing debugging information (optional)
Distribute Python Packages
Distribute the following files to integrate a Python® package in an application.
setup.py
— Python installer_init_.py
— initialization script for the Python packagepackageName
.ctf
— deployable archiveFunction signatures of the deployed MATLAB functions (for details, see Customize Code Suggestions and Completions)