| MATLAB Compiler | ![]() |
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.
mcc -v -W main -T link:exe myfun % Options listed separately mcc -vW main -T link:exe myfun % Options combined
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,
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.
| Note Macros and regular options may both affect the same settings and may therefore override each other depending on their order in the command line. |
| Command Overview | Setting Up Default Options | ![]() |
© 1994-2005 The MathWorks, Inc.