| Version 4.0 (R14) MATLAB Compiler Release Notes | ![]() |
This table summarizes what's new in Version 4.0 (R14):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | Yes—Details labeled as Compatibility Considerations, below. See also Summary. | No bug fixes | No |
New features and changes introduced in this version are:
MATLAB Compiler can generate the following kinds of applications or components. None of these requires MATLAB on the end user's system.
Standalone applications
C and C++ shared libraries (dynamically linked libraries, or DLLs, on Microsoft Windows)
Excel add-ins; requires MATLAB Builder for Excel
COM objects; requires MATLAB Builder for COM
MATLAB Compiler supports all the functionality of MATLAB, including objects. In addition, no special considerations are necessary for private and method functions; they are handled by MATLAB Compiler.
The C++ interface for MATLAB Compiler generated wrapper functions has been improved.
Note MATLAB Compiler 4 will not compile every toolbox, consequently, some MathWorks toolboxes will not be deployable. Portions of toolboxes may be nondeployable due to licensing restrictions (in general, compilation of toolbox graphical user interfaces will be restricted). MATLAB Compiler will not compile Simulink®, Stateflow®, or products that require them. For more information regarding the compilability of toolboxes, see the MATLAB Compiler product page on the Web. |
MATLAB Compiler 4 uses the new MATLAB Compiler Runtime (MCR), which is a standalone set of shared libraries that enable the execution of compiled M-files, instead of the MATLAB C/C++ Math and Graphics Libraries. The MCR provides complete support for all features of the MATLAB language.
MATLAB Compiler 4 also uses a Component Technology File (CTF) archive to house the deployable package. All M-files are encrypted in the CTF archive using the Advanced Encryption Standard (AES) cryptosystem, where symmetric keys are protected by 1024-bit RSA keys.
MATLAB Compiler 4 is compatible with previous releases of MATLAB Compiler. M-files that you compiled with a previous version of MATLAB Compiler should compile with this version if your M-files contain only compilable Release 14 functions. There are no restrictions on the contents of your M-files other than compatibility with Release 14.
MATLAB Compiler supports the full MATLAB language and almost all MATLAB based toolboxes. However, some limited MATLAB and toolbox functionality is not licensed for compilation:
Functionality that cannot be called directly from the command line will not compile.
Most of the prebuilt graphical user interfaces included in MATLAB and its companion toolboxes will not compile, for example, sptool from Signal Processing Toolbox.
Some toolboxes, such as Symbolic Math Toolbox, will not compile.
The code generated by MATLAB Compiler is not suitable for embedded applications.
To see an up-to-date list of noncompilable toolboxes and functionality, visit the MATLAB Compiler product page on the Web.
This section highlights significant differences between Compiler 4 and previous versions of 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 MATLAB Compiler fully supports all features of the MATLAB language including objects:
Compiler 4 uses the new MATLAB Compiler 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. Support is planned for 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 MATLAB Compiler from a shell (DOS or UNIX) prompt. Consequently, mccsavepath is no longer available with Compiler 4.
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 MATLAB Compiler from your M-file routines has changed. Unlike previous versions of 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.
Compiler 4 has deprecated options that involve code generation and formatting. The following options are no longer supported and will produce errors if used.
| 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 |
| W comhg W excelhg W libhg W mainhg | W com |
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. |
![]() | Version 4.0.1 (R14+) MATLAB Compiler | Compatibility Summary for MATLAB® Compiler™ Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |