MATLAB Compiler    

mcc

Bold entries in the Comment/Options column indicate default values.

Table A-1: mcc Quick Reference  
Option
Description
Comment/Options
A annotation:type
Controls M-file code/comment inclusion in generated C/C++ source
type = all
    comments
    none

A debugline:setting
Controls the inclusion of source filename and line numbers in run-time error messages
setting = on
    off

A line:setting
Controls the #line preprocessor directives included in the generated
C/C++ source
setting = on
    off

b
Generates a Visual Basic file containing the Microsoft Excel Formula Function interface to the Compiler-generated COM object.

B filename
Replaces -B filename on the mcc command line with the contents of filename
The file should contain only mcc command line options.
c
When used with a macro option, generates C code only
Overrides -T option; equivalent to -T codegen
d directory
Places output in specified directory

f filename
Uses the specified options file, filename
mex -setup and mbuild -setup are recommended.
F option
Specifies format parameters
option = list
    expression-indent:n
    page-width:n
    statement-indent:n

g
Generates debugging information
Equivalent to
-G -A debugline:on -O none
G
Debug only. Simply turn debugging on, so debugging symbol information is included.

h
Compiles helper functions

i
Causes Compiler to include only M-files specified on the command line as exported interfaces.

I directory
Adds new directory to path

l
Generates code that reports file and line numbers on run-time errors
Equivalent to
-A debugline:on
L language
Specifies output target language
language = C
    Cpp

m
Macro to generate a C stand-alone application
Equivalent to
-W main -L C -t -T link:exe
-h libmmfile.mlib

M string
Passes string to mex or mbuild
Use to define compile-time options.
o outputfile
Specifies name/location of final executable

O option:[on|off]
O all
O none
O list

Build an optimized executable.
option =
array_indexing
fold_mxarrays
fold_non_scalar_mxarrays
fold_scalar_mxarrays
optimize_conditionals
optimize_integer_for_loops
percolate_simple_types
speculate

p
Macro to generate a C++ stand-alone application
Equivalent to
-W main -L Cpp -t -T link:exe
-h libmmfile.mlib

S
Macro to generate Simulink S-function
Equivalent to
-W simulink -L C -t -T link:mex libmatlbmx.mlib
t
Translates M code to C/C++ code

T target
Specifies output stage
target = codegen
    compile:bin
    link:bin

where bin =mex
    exe
    lib

u number
Specifies number of inputs for Simulink S-function

v
Verbose; Displays compilation steps

w option
Displays warning messages
option = list
    level
    level:string

where level =disable
    enable
    error

No w option displays only serious warnings (default).
W type
Controls the generation of function wrappers
type = mex
    main
    simulink
    lib:string
    com:compnm[,clnm[,mj.mn]]
    comhg:compnm[,clnm[,mj.mn]]
    excel:compnm[,clnm[,mj.mn]]
    excelhg:compnm[,clnm[,mj.mn]]

x
Macro to generate MEX-function
Equivalent to
-W mex -L C -t -T link:mexlibrary libmatlbmx.mlib
y number
Specifies number of outputs for Simulink S-function

Y licensefile
Uses licensefile when checking out a Compiler license

z path
Specifies path for library and include files

?
Displays help message


  Common Uses of the Compiler Error and Warning Messages