User`s guide
Alternative Ways of Compiling M-Files
4-41
mcc -m main_main.c main.c rank.c mrank.c
The resulting stand-alone application uses your customized version of mlfRank
rather than the default version of
mlfRank stored in the MATLAB M-File Math
Library.
Note On PCs running Windows, as well as SGI, SGI64, and IBM, if a
function in the MATLAB M-File Math Library calls
mlfRank, it will call the
one found in the Library and not your customized version. We recommend that
you call your version of rank something else, for example, myrank.m.
Compiling mrank.m and rank.m as Helper
Functions
Another way of building the mrank stand-alone application is to compile rank.m
and
mrank.m as helper functions to main.m. In other words, instead of invoking
the MATLAB Compiler three separate times, invoke the MATLAB Compiler
only once. For C
mcc -m main rank
For C++
mcc -p main rank
These commands create files containing the C or C++ source code. The macro
options
-m and -p automatically compile all helper functions.