| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB Compiler |
| Contents | Index |
| Learn more about MATLAB Compiler |
Bundle files provide a convenient way to group sets of MATLAB Compiler options and recall them as needed. The syntax of the bundle file option is:
-B <filename>[:<a1>,<a2>,...,<an>]
When used on the mcc command line, the bundle option -B replaces the entire string with the contents of the specified file. The file should contain only mcc command-line options and corresponding arguments and/or other file names. The file may contain other -B options.
A bundle file can include replacement parameters for MATLAB Compiler options that accept names and version numbers. For example, there is a bundle file for C shared libraries, csharedlib, that consists of:
-W lib:%1% -T link:lib
To invoke MATLAB Compiler to produce a C shared library using this bundle, you can use:
mcc -B csharedlib:mysharedlib myfile.m myfile2.m
In general, each %n% in the bundle file will be replaced with the corresponding option specified to the bundle file. Use %% to include a % character. It is an error to pass too many or too few options to the bundle file.
See the following table for a list of bundle files available with MATLAB Compiler.
Bundle File | Creates | Contents |
|---|---|---|
| cpplib | C++ Library | -W cpplib:<shared_library_name> -T link:lib |
| csharedlib | C Shared Library | -W lib:<shared_library_name> -T link:lib |
Note Additional bundle files are available when you have a license for products layered on MATLAB Compiler. For example, if you have a license for MATLAB Builder NE , you can use the mcc command with bundle files that create COM objects and .NET objects. |
![]() | Using Path Names | Using Wrapper Files | ![]() |

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