User`s guide
The MATLAB Compiler Family
1-13
The Compiler takes your M-file(s) and can generate C or C++ code. It can also
generate one of four wrapper files depending on your specified target. This
table shows the wrapper files the Compiler can generate, their associated
targets, and the corresponding
-W option (wrapper).
Each numbered node in Figure 1-3, MATLAB Compiler Uses, indicates a
combination of C/C++ code and a wrapper that generates a specific target type.
The file(s) formed by combining the C/C++ code (denoted by “User C/C++
Code”)and thewrapperarethenpassedtothe C/C++compiler,whichcombines
them with any user-defi ned C/C++ programs, and eventua lly links them
against the appropriate libraries. The end result of this sequence is the target
as described in the table above.
Table 1-1: Compiler 2.1 Wrappers and Targets
Wrapper File Target -W Setting
Main Stand-alone C or C++ program
-W main
MEX MATLAB C MEX-file
-W mex
Library C shared library or
C++ static library
-W lib:libname
Simulink
S-function
Simulink C MEX-file
-W simulink