Matlab mex 命令行参数详解
来源:互联网 发布:郭天祥十天单片机下载 编辑:程序博客网 时间:2024/06/08 19:25
MATLAB Application Program Interface Search Help Desk The mex Script
OptionFunction
The file that occurs first in this list is used:
· ./<filename>
· $HOME/matlab/<filename>
· $TMW_ROOT/bin/<filename>
Compiles a MEX-function from C or Fortran source code
Syntax
MEX <options> <files>
Arguments
All non-source code file names passed as arguments are passed to the linker without being compiled.These options are available on all platforms except where noted:-argcheck
Perform argument checking on MATLAB API functions (C functions only).-c
Compile only; do not link.-D<name>[=<def>]
(UNIX and Macintosh) Define C preprocessor macro <name>
[as having value <def>
.]-D<name>
(Windows) Define C preprocessor macro <name>
.-f <file>
(UNIX and Windows) Use <file>
as the options file; <file>
is a full path name if it is not in current directory. . (On Windows, not necessary if you use the -setup
option.)-f <file>
(Macintosh) Use <file>
as the options file. (Not necessary if you use the -setup
option.) If <file>
is specified, it is used as the options file. If <file>
is not specified and there is a file called mexopts
in the current directory, it is used as the options file. If <file>
is not specified and mexopts
is not in the current directory and there is a file called mexopts
in the directory <matlab>:extern:scripts:
, it is used as the options file. Otherwise, an error occurs.-F <file>
(UNIX) Use <file>
as the options file. <file>
is searched for in the following manner:The file that occurs first in this list is used:
· ./<filename>
· $HOME/matlab/<filename>
· $TMW_ROOT/bin/<filename>
-F <file>
(Windows) Use <file>
as the options file. (Not necessary if you use the -setup option.) <file>
is searched for in the current directory first and then in the same directory as mex.bat
.-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.-l<file>
(UNIX) Link against library lib<file>
.-L<pathname>
(UNIX) Include <pathname>
in the list of directories to search for libraries.<name>=<def>
(UNIX and Macintosh) Override options file setting for variable <name>
.-n
No execute flag. Using this option causes the commands that would be used to compile and link the target to be displayed without executing them.-output <name>
Create an executable named <name>
. (An appropriate executable extension is automatically appended.)-O
Build an optimized executable.-setup
(Windows and Macintosh Only) Set up default options file. This switch should be the only argument passed.-U<name>
(UNIX and Windows) Undefine C preprocessor macro <name>
.-V4
Compile MATLAB 4-compatible MEX-files.-v
Verbose; print all compiler and linker settings.Description
MEX <options> <files>
compiles a MEX-function from C or Fortran source code. All non-source code file names passed as arguments are passed to the linker without being compiled.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), andmexopts
(Macintosh).Note: The MathWorks provides an option (setup
) for the mex
script that lets you set up a default options file on Windows and Macintosh systems. See theApplication Program Interface Guide for additional information.On UNIX, the options file is written in the Bourne shell script language. The options file that occurs first in the following list is used:Any variable specified in the options file can be overridden at the command line by use of the./mexopts.sh
,$HOME/matlab/mexopts.sh
,$MATLAB/bin/mexopts.sh
.
<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 Language 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'
). 0 0
- Matlab mex 命令行参数详解
- Matlab MEX
- matlab mex
- matlab+mex
- matlab调用c++,应该用mex把cpp编译成 .mex文件供MATLAB在命令行方式下调用吧
- matlab中 mcc、mbuild和mex命令详解
- matlab中 mcc、mbuild和mex命令详解
- matlab中mcc、mbuild和mex命令详解
- matlab中 mcc、mbuild和mex命令详解
- matlab中 mcc、mbuild和mex命令详解
- Matlab调用C++代码的具体mex实现详解
- php 命令行参数详解
- php命令行参数详解
- WinRAR命令行参数详解
- VLC命令行参数详解
- VLC命令行参数详解
- gcc 命令行参数详解
- gcc 命令行参数详解
- Java内存泄露
- 小波变换和motion信号处理(一)
- 对于学习ror的 半年的总结及下一年的计划
- android个人笔记(二)——NDK开发常用工具
- Struts1与Struts2原理 区别 详解 汇总
- Matlab mex 命令行参数详解
- 金山手机助手为啥非要用adb的端口?
- 浙大PAT basic level 解题1016-10120
- java中的缓存
- stretchableImageWithLeftCapWidth
- 黑马程序员——反射机制
- V4L2
- nginx标签说明
- 2.2 long long整型