Table 3-3: MEX Script Switches
Switch
|
Function
|
@<rsp_file>
|
Include the contents of the text file <rsp_file> as command line arguments to the mex script.
|
-argcheck
|
Perform argument checking on MATLAB API functions (C functions only).
|
-c
|
Compile only; do not link.
|
-D<name>[#<def>]
|
Define C preprocessor macro <name> [as having value <def> ]. (Note: UNIX also allows -D<name>[=<def>] .)
|
-f <file>
|
Use <file> as the options file; <file> is a full pathname if it is not in current directory.
|
-g
|
Build an executable with debugging symbols included.
|
-h[elp]
|
Help; lists the switches and their functions.
|
-I<pathname>
|
Include <pathname> in the compiler include search path.
|
-inline
|
Inlines matrix accessor functions (mx* ). The generated MEX-function may not be compatible with future versions of MATLAB.
|
-l<file>
|
(UNIX) Link against library lib<file> .
|
-L<pathname>
|
(UNIX) Include <pathname> in the list of directories to search for libraries.
|
<name>#<def>
|
Override options file setting for variable <name> . This option is equivalent to <ENV_VAR>#<val> , which temporarily sets the environment variable <ENV_VAR> to <val> for the duration of the call to mex . <val> can refer to another environment variable by prepending the name of the variable with a $ , e.g., COMPFLAGS#"$COMPFLAGS -myswitch" .
|
<name>=<def>
|
(UNIX) Override options file setting for variable <name> .
|
-O
|
Build an optimized executable.
|
-outdir <name>
|
Place all output files in directory <name> .
|
-output <name>
|
Create an executable named <name> . (An appropriate executable extension is automatically appended.)
|
-setup
|
Set up default options file. This switch should be the only argument passed.
|
-U<name>
|
Undefine C preprocessor macro <name> .
|
-v
|
Verbose; print all compiler and linker settings.
|
-V5
|
Compile MATLAB 5-compatible MEX-file.
|
© 1994-2005 The MathWorks, Inc.