MATLAB COMPILER RELEASE NOTES Guida Utente Pagina 106

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 105
4 Stand-Alone Applications
4-36
To compile and link all four C source code files (main.c, rank.c, mrank.c,and
main_main.c) into a stand-alone application, use
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 Toolbox
Library.
Note On PCs running Windows, as well as SGI, SGI64, and IBM, if a
function in the MATLAB Toolbox 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
Anotherway ofbuilding themrank stand-alon e ap pl icat ion 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.
Vedere la pagina 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 263 264

Commenti su questo manuale

Nessun commento