Using Bundle Files

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 could 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

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS