User`s guide

mcc
7-37
For example, to translate an M-file named mymfile.m into C and to create a
stand-alone executable that can be run without MATLAB, use
mcc -m mymfile
The -m option is equivalent to the series of options
-W main -L C -t -T link:exe -h libmmfile.mlib
-p (Stand-Alone C++). Produce a stand-alone C++ application. It includes helper
functions by default (
-h), and then generates a s tand-alone C++ wrapper (-W
main
). In the final stage, this option compiles your code into a stand-alone
executable and links it to the MATLAB C/C++ Math Library (
-T link:exe).
For example, to translate an M-file named
mymfile.m into C++ and to create a
stand-alone executable that can be run without MATLAB, use
mcc -p mymfile
The -p option is equivalent to the series of options
-W main -L Cpp -t -T link:exe -h libmmfile.mlib
-S (Simulink S-Function).
Produce a Simul ink S -functi on t h at is co mpat ible with
the Simulink S-function block. For example, to translate an M-file named
mymfile.m into C and to create t he corres pond ing S imulink S-function using
dynamically sized inputs and outputs, use
mcc -S mymfile
The -S option is equivalent to the series of options
-W simulink -L C -t -T link:mex libmatlbmx.mlib
-x (MEX-Function). Produce a MEX-function. For example, to translate an M-file
named
mymfile.m into C and t o create t he corresponding MEX-file that can be
called directly from MATLAB, use
mcc -x mymfile
The -x option is equivalent to the series of options
-W mex -L C -t -T link:mexlibrary libmatlbmx.mlib
-B sgl (Stand-Alone C Graphics Library). Produce a stand -alo ne C application that
uses Handle Graphics.