MATLAB Compiler | ![]() ![]() |
Generated Code
This chapter investigates the generated header files, interface functions, and wrapper functions for the C MEX, stand-alone C and C++ targets, and C and C++ libraries.
When you use the MATLAB Compiler to compile an M-file, it generates these files:
-L
) specification
-W
option
The C or C++ code that is generated by the Compiler and the header file are independent of the final target type and target platform. That is, the C or C++ code and header file are identical no matter what the desired final output. The wrapper file provides the code necessary to support the output executable type. So, the wrapper file is different for each executable type.
Table 5-1, Compiler-Generated Files, shows the names of the files generated when you compile a generic M-file Table 5-1(file.m
) for the MEX and stand-alone targets. The table also shows the files generated when you compile a set of files (filelist
) for the library target and the COM target.
Note
Many of the code snippets generated by the MATLAB Compiler that are used in this chapter use the -F page-width option to produce readable code that fits nicely on the book's printed page. For more information about the page-width option, see Formatting Compiler-Generated Code.
|
![]() | Code Generation Overview | Compiling Private and Method Functions | ![]() |