User`s guide
How Does MATLAB Compiler Wor k?
How Does MATLAB Compiler Work?
In this section...
“MATLAB C ompiler Genera ted App l ication or L ib rary” on pag e 1-3
“Wrapper Files” on page 1-3
“Component Tec
hnology File (C TF)” on page 1-4
MATL AB Compiler Generated Application or Library
When you package and distribute applications and libraries that are
generated b y M ATLAB Compiler, you must include the MATLAB Component
Runtime (MCR) as well as a set of supporting files generated by MATLAB
Compiler. You must also set the system paths on the target m achine so that
the MCR and supporting files can be found.
An application or library generated by M ATLAB Compiler has two parts: a
platform- s pecific binar y file and an archive fil e c ontaining MATLAB fun c tion s
and data. For a n application, the binary file consists of a main function, and
for a library the binary file exports multiple functions that can be called by
users of the library.
Wrapper Files
To create the platform-specific binaries that you specify, MATLAB Compiler
generates one or more wrapper files. A w rapper file provides an interface
to the compiled M-code. W rapper files differ depending on the execution
environment.
The wrapper file does the following:
• Performs initialization and termination as needed by a particular interface.
• Defines data arrays containing path information, encryptio n keys, an d
other information needed by the MCR.
• Provides the necessary code to forward c alls from the interface functions to
the MATLAB functions in the MCR.
• For an application, contains the
main function
1-3