MATLAB Compiler | ![]() ![]() |
Differences Between MEX-Files and Stand-Alone Applications
MEX-files and stand-alone applications differ in these respects:
MEX-Files
It is now possible to call MEX-files from Compiler-generated stand-alone applications. The Compiler will compile MEX-files whenever they are specified on the command line or are located using the -h
option to find helper functions. The MEX-files will then be loaded and called by the stand-alone code.
If an M-file and a MEX-file appear in the same directory and the M-file contains at least one function, the Compiler will compile the M-file instead of the MEX-file. If the MEX-file is desired instead, you must use the %#mex
pragma. For more information on this pragma, see the %#mex
reference page.
Note The Compiler-generated code cannot invoke Compiler-generated MEX-files. Specify the M-file(s) source instead and the Compiler will compile those into the stand-alone application. |
![]() | Stand-Alone Applications | Stand-Alone C Applications | ![]() |