MATLAB Compiler Previous page   Next Page

Compiler Options

You may specify one or more MATLAB Compiler option flags to mcc. Most option flags have a one-letter name. You can list options separately on the command line, for example,

Macros are MathWorks supplied Compiler options that simplify the more common compilation tasks. Instead of manually grouping several options together to perform a particular type of compilation, you can use a simple macro option. You can always use individual options to customize the compilation process to satisfy your particular needs. For more information on macros, see Using Macros to Simplify Compilation.

Combining Options

You can group options that do not take arguments by preceding the list of option flags with a single dash (-), for example:

Options that take arguments cannot be combined unless you place the option with its arguments last in the list. For example, these formats are valid.

This format is not valid.

In cases where you have more than one option that takes arguments, you can only include one of those options in a combined list and that option must be last. You can place multiple combined lists on the mcc command line.

If you include any C or C++ filenames on the mcc command line, the files are passed directly to mbuild, along with any Compiler-generated C or C++ files.

Conflicting Options on Command Line

If you use conflicting options, the Compiler resolves them from left to right, with the rightmost option taking precedence. For example, using the equivalencies in Table 5-1, Macro Options,

is equivalent to

In this example, there are two conflicting -W options. After working from left to right, the Compiler determines that the rightmost option takes precedence, namely, -W none, and the Compiler does not generate a wrapper.


Previous page  Command Overview Setting Up Default Options Next page

© 1994-2005 The MathWorks, Inc.