| MATLAB® Compiler Release Notes |
|
Differences Between Release 14 and Previous Versions of the MATLAB Compiler
This section highlights significant differences between Compiler 4 and previous versions of the MATLAB Compiler.
MATLAB Compiler 4 is a deployment tool for creating software components and complete applications that can be distributed to other users. This version of the MATLAB Compiler fully supports all features of the MATLAB language including objects:
- Compiler 4 uses the new MATLAB Component Runtime (MCR), which is a stand-alone set of shared libraries that enable the execution of compiled M-files, instead of the MATLAB C/C++ Math and Graphics Libraries.
- Compiler 4 does not support the creation of MEX-files and Simulink S-functions from M-functions because features in MATLAB 7 make this functionality redundant. The MATLAB JIT makes compilation for speed obsolete, and the MATLAB
pcode (preparsed code) function enables you to hide your proprietary algorithms.
- Compiler 4 is supported on Microsoft Windows and Linux only. We expect to add additional platforms in a future release.
- Compiler 4 does not include the MATLAB Add-in for Visual Studio.
- Compiler 4 does not speed up applications. There is no speed difference between a compiled application and running it in MATLAB. The compiled application will run as fast as MATLAB with the JIT Accelerator.
- MATLAB does not support the loading of MATLAB Compiler-generated libraries via the
loadlibrary function.
- Compiler 4 does not support the set of imputed functions including
mbchar, mbcharscalar, mbcharvector, mbint, mbintscalar, mbintvector, mbreal, mbrealscalar, mbrealvector, mbscalar, and mbvector. Compiler 4 makes the need for these functions obsolete.
- Compiler 4 eliminates the need to use
mccsavepath to invoke the MATLAB Compiler from a shell (DOS or UNIX) prompt. Consequently, mccsavepath is no longer available with Compiler 4.
Wrapper Differences
- Compiler 4 only generates code for interface functions (wrappers), whereas previous versions generated code for the entire M-file. There are several differences to be aware of when calling Release 14 Compiler functions from C or C++:
- Since Compiler 4 does not use the MATLAB C/C++ Math and Graphics Libraries, the various
mlf functions previously available with the libraries are no longer available. Some of the Release 13 mlf functions have Release 14 equivalents in the MATLAB External Interface functions. For example, you can replace calls to mlfScalar with calls to mxCreateDoubleScalar.
- The interface to the
mlf functions generated by the Compiler from your M-file routines has changed. Unlike previous versions of the MATLAB Compiler, all the return values are passed as input to the function. The return value of these functions is void. See the MATLAB Compiler documentation for additional details.
- The
initialize routine now returns a status flag that can be used to test if the library was initialized properly.
| Note
These wrapper file differences only affect users who build libraries; they do not affect users who build executables.
|
Deprecated Compiler Options
- Compiler 4 has deprecated options that involve code generation and formatting. The options below are no longer supported and will produce errors.
Option
|
Description
|
A
|
Code annotation
|
B pcode
|
Generate P-code
|
F
|
Format parameters
|
h
|
Helper functions
|
i
|
Include specified M-files
|
l
|
Line/file numbers (This option has changed and now means "library".)
|
L
|
Target language
|
O
|
Optimized code
|
p
|
Generate C++ code (This option has changed and now means "add directory to compilation path in an order-sensitive context".)
|
S
|
Macro to generate Simulink S-function
|
t
|
Translate M-code to C/C++ code
|
u
|
Specifies number of inputs for Simulink S-function
|
x
|
Macro to generate MEX-function
|
y
|
Specifies number of outputs for Simulink S-function
|
- Compiler 4 has deprecated some wrapper options and their associated bundle files. The following wrapper options and their associated bundle files are deprecated and are replaced by the new ones.
Wrapper Option/Bundle File
|
Replaced By
|
B csglcom B csglexcel B csglsharedlib B cppsglcom B cppsglexcel
|
B ccom B cexcel B csharedlib B cppcom B cppexcel
|
W comhg W excelhg W libhg W mainhg
|
W com W excel W lib W main
|
- You no longer need to use
-B sgl and -B sglcpp to access Handle Graphics® functions. All compiled applications have access to graphics by default.
New Compiler Options
Compiler 4 includes several new options.
Option
|
Description
|
a filename
|
Add filename to archive; specifies files to be directly added to the CTF archive.
|
l
|
Macro that generates a function library. (The meaning of this option has changed since Release 13.)
|
N
|
Clears the path of all but a minimal, required set of directories.
|
p <directory>
|
Add directory to compilation path in an order-sensitive context; requires -N option.
|
R -nojvm R -nojit
|
Run-time; provides MCR options; same as MATLAB startup options of the same name; only used with executable target.
|
 | Upgrading from an Earlier Release | |
© 1994-2005 The MathWorks, Inc.