| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| R2010b Documentation → MATLAB Builder NE |
| Contents | Index |
| Learn more about MATLAB Builder NE |
When you use the Deployment Tool (deploytool) GUI, you perform any function you would invoke using the MATLAB Compiler mcc command-line interface. The Deployment Tool interactive menus and dialogs build mcc commands that are customized to your specification. As such, your MATLAB code is processed the same way as if you were compiling it using mcc.
Deployment Tool advantages include:
You perform related deployment tasks with a single intuitive GUI.
You maintain related information in a convenient project file.
Your project state persists between sessions.
Your previous project loads automatically when the Deployment Tool starts.
You load previously stored compiler projects from a prepopulated menu.
Package applications for distribution.
To build an application, MATLAB Compiler software performs these tasks:
Parses command-line arguments and classifies by type the files you provide.
Analyzes files for dependencies using the Dependency Analysis Function (depfun). Dependencies affect deployability and originate from functions called by the file. Deployability is affected by:
File type — MATLAB, Java, MEX, and so on.
File location — MATLAB, MATLAB toolbox, user code, and so on.
File deployability — Whether the file is deployable outside of MATLAB
For more information about depfun, see What You Should Know About the Dependency Analysis Function (depfun).
Validates MEX-files. In particular, mexFunction entry points are verified. For more details about MEX-file processing, see Compiling MEX-Files, DLLs, or Shared Libraries.
Creates a CTF archive from the input files and their dependencies. For more details about CTF archives see The Role of the Component Technology File (CTF Archive).
Generates target-specific wrapper code. For example, a C main function requires a very different wrapper than the wrapper for a Java interface class.
Invokes a third-party target-specific compiler to create the appropriate binary software component (a standalone executable, a Java JAR file, and so on).
For details about how MATLAB Compiler software builds your deployable component, see How Does MATLAB Compiler Software Build My Application?.
MATLAB Compiler uses a dependency analysis function (depfun) to determine the list of necessary files to include in the CTF package. Sometimes, this process generates a large list of files, particularly when MATLAB object classes exist in the compilation and depfun cannot resolve overloaded methods at compile time. Dependency analysis also processes include/exclude files on each pass (see the mcc flag -a Add to Archive).
Tip To improve compile time performance and lessen application size, prune the path with -N Clear Path, -p Add Directory to Path. You can also specify Toolboxes on Path in the deploytool Settings For more information about depfun and addpath and rmpath, see Dependency Analysis Function (depfun) and User Interaction with the Compilation Path. |
depfun searches for executable content such as:
MATLAB files
P-files
Java classes and .jar files
.fig files
MEX-files
depfun does not search for data files of any kind (except MAT files). You must manually include data files in the search
When you compile MATLAB functions containing MEX-files, ensure that depfun can find them. Doing so allows you to avoid many common compilation problems. In particular, note that:
Because depfun cannot examine MEX-files, DLLs, or shared libraries to determine their dependencies, explicitly include all executable files these files require. To do so, use either the mcc -a option or the options on the Advanced tab in the Deployment Tool under Settings.
If you have any doubts that depfun can find a MATLAB function called by a MEX-file, DLL, or shared library, then manually include that function. To do so, use either the mcc -a option or by using the options on the Advanced tab in the Deployment Tool under Settings.
Not all functions are compatible with MATLAB Compiler. Check the file mccExcludedFiles.log after your build completes. This file lists all functions called from your application that you cannot deploy.
Each application or shared library you produce using MATLAB Compiler has an associated Component Technology File (CTF) archive. The archive contains all the MATLAB based content (MATLAB files, MEX-files, and so on) associated with the component.
MATLAB Compiler also embeds a CTF archive in each generated binary. The CTF houses all deployable files. All MATLAB files encrypt in the CTF archive using the Advanced Encryption Standard (AES) cryptosystem.
If you choose the extract the CTF archive as a separate file the files remain encrypted. For more information on how to extract the CTF archive refer to the references in the following table.
Information on CTF Archive Embedding/Extraction and Component Cache
| Product | Refer to |
|---|---|
| MATLAB Compiler | Overriding Default CTF Archive Embedding Using the MCR Component Cache |
| MATLAB Builder NE | Extracting the CTF Archive Manually Using the MCR Component Cache |
| MATLAB Builder JA | Using MCR Component Cache and MWComponentOptions |
| MATLAB Builder EX | Overriding Default CTF Archive Embedding for Components Using the MCR Component Cache |

Multiple CTF archives, such as those generated with COM, .NET, or Excel® components, can coexist in the same user application. You cannot, however, mix and match the MATLAB files they contain. You cannot combine encrypted and compressed MATLAB files from multiple CTF archives into another CTF archive and distribute them.
All the MATLAB files from a given CTF archive associate with a unique cryptographic key. MATLAB files with different keys, placed in the same CTF archive, do not execute. If you want to generate another application with a different mix of MATLAB files, recompile these MATLAB files into a new CTF archive.
MATLAB Compiler deleted the CTF archive and generated binary following a failed compilation, but only if these files did not exist before compilation initiates. Run help mcc -K for more information.
Caution Release Engineers and Software Configuration Managers: Do not use build procedures or processes that strip shared libraries on CTF archives. If you do, you can possibly strip the CTF archive from the binary, resulting in run-time errors for the driver application. |
![]() | How the Deployment Products Process MATLAB Function Signatures | Guidelines for Writing Deployable MATLAB Code | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |