hehe,
我将懒得翻译了。
?help mex
MEX Compile MEX-function.
All non-source code file names passed as arguments are passed to the
linker without being compiled.
Available options on all platforms are:
-argcheck Add code to check validity of input arguments to
MATLAB API functions (C functions only)
-c Compile only; do not link
-D<name>[=<def>] Define preprocessor macro name <name> [as having value
<def> (assignment not available under Windows)]
-f <file> Use <file> as the options file; <file> is a full path
name if not in current directory
-g Build a MEX-function with debugging symbols included
-h[elp] Help; print this message
-I<pathname> Include <pathname> in the compiler include path
-O Build an optimized MEX-function
-output <name> Create MEX-function named <name> (an appropriate
MEX-file extension is automatically appended)
-V4 Compile MATLAB 4 compatible MEX-file
-v Verbose; print all compiler and linker settings
On UNIX, the following options are available:
-l<file> Link against library lib<file>
-L<pathname> Include <pathname> in the list of directories to search
for libraries
-U<name> Undefine preprocessor macro name <name>
<name>=<def> Override options file setting for variable <name>
On Windows, the following options are available:
-setup Setup location of installed compiler. This
switch should be the only argument passed
-U<name> Undefine preprocessor macro name <name>
On the Macintosh, the following options are available:
<name>=<def> Override options file setting for variable <name>
MEX's execution is affected by both command-line arguments and
an options file. The options file contains all compiler-specific
information necessary to create a MEX-function. The default name for this
options file, if none is specified with the -f option, is "mexopts.bat"
(Windows), "mexopts.sh" (UNIX), and "mexopts" (Macintosh).
On UNIX, the options file is written in the Bourne shell script language.
The options file which occurs first in the following list is used:
./mexopts.sh, $HOME/matlab/mexopts.sh, $MATLAB/bin/mexopts.sh. Any
variable specified in the options file can be overridden at the command
line by use of the <name>=<def> command line argument. If <def> has
spaces in it, then it should be wrapped in single quotes
(e.g. OPTFLAGS='opt1 opt2'). The definition can rely on other variables
defined in the options file; in this case the variable referenced should
have a prepended "$" (e.g. OPTFLAGS='$OPTFLAGS opt2').
On Windows, the options file is written in the Perl script language. The
options file, mexopts.bat, is searched for in the following directories:
the current directory first, then the same directory as "mex.bat". No
arguments can have an embedded equal sign ("="); thus,
-DFOO is valid, but
-DFOO=BAR is not.
On the Macintosh, the options file is written in the MPW scripting
language for MPW C and Langauge Systems Fortran, and in M-code language
for Metrowerks Codewarrior C. The default location for the options
file is the <MATLABROOT>:extern:scripts folder. Any variable specified
in the options file can be overridden at the command line by use of the
<name>=<def> command line argument. If <def> has spaces in it, then it
should be wrapped in single quotes (e.g. OPTIMFLAGS='opt1 opt2'). The
definition can rely on other variables defined in the options file; in
this case the variable referenced should have a prepended "$"
(e.g. OPTIMFLAGS='$OPTIMFLAGS opt2').
不知你在哪个乡,我也想去混混了