Matlab------------GUI编程:mcc命令参数用法
2012-04-17 18:46
691 查看
创建动态链接库主要有两种方法: 一种是使用Matlab 为VC++ IDE提供的Add-in。这种方法比较简单,方便快捷,只要在VC++中创建工程的时候选择Matlab Project Wizard,并且在接下来的Step 1 中的Visual Matlab Application Type选择Shared
M-DLL 就可以了。接下来就是添加*.m 文件, 进行编译了。另一种方法就是使用Matlab 的mcc 命令将*.m文件编译为动态链接库( *.DLL)。因为Add-in 也是调用Compiler 的命令mcc 进行编译工作的, 而且有时候这个Add-in 还会出现不能使用的情况, 因此这里主要讨论使用mcc 命令的方法。
关于mcc 有很多参数可以使用, 而且有多种用法,主要参数如下:
Bold entries in the Comment/Options column indicate default values
M-DLL 就可以了。接下来就是添加*.m 文件, 进行编译了。另一种方法就是使用Matlab 的mcc 命令将*.m文件编译为动态链接库( *.DLL)。因为Add-in 也是调用Compiler 的命令mcc 进行编译工作的, 而且有时候这个Add-in 还会出现不能使用的情况, 因此这里主要讨论使用mcc 命令的方法。
关于mcc 有很多参数可以使用, 而且有多种用法,主要参数如下:
Bold entries in the Comment/Options column indicate default values
-a filename | Add filename to the CTF archive | 无 |
-b | Generate Excel-compatible formula function | Requires MATLAB Builder for Excel |
-B filename[:arg[,arg]] | Replace -B filename on the mcc command line with the contents of filename | The file should contain only mcc command line options. These are MathWorks included options files: -B csharedlib:foo C shared library -B cpplib:fooC++ library |
-c | 生成C语言包装函数 | Equivalent to -T codegen |
-d directory | 输出到指定目录 | 无 |
-f filename | Use the specified options file, filename, when calling mbuild | mbuild -setup is recommended. |
-g | 生成 debugging 信息 | 无 |
-G | 同 -g | 无 |
-I directory | Add directory to search path for M-files | MATLAB path is automatically included when running from MATLAB, but not when running from DOS/UNIX shell. |
-l | 创建库函数的宏 | 等效于命令 -W lib -T link:lib |
-m | 生成C语言独立运行程序的宏 | 等效于命令 -W main -T link:exe |
-M string | 传递字符串给 mbuild | Use to define compile-time options. |
-N | Clear the path of all but a minimal, required set of directories | 无 |
-o outputfile | 制定最终可执行文件的名字 | Adds appropriate extension |
-P directory | Add directory to compilation path in an order-sensitive context | Requires -N option |
-R option | Specify run-time options for MCR | option = -nojvm -nojit |
-S | Create Singleton MCR | Requires MATLAB Builder for COM |
-T target | Specify output stage | target = codegen compile: bin link:bin where bin =exe lib |
-v | 显示详细; 显示编译步骤 | 无 |
-w option | 显示警告信息 | option = list level level:string where level =disable enable error |
-W type | Control the generation of function wrappers | type = main cpplib:<string> lib:<string> none com:compname,clname,version |
-Y licensefile | Use licensefile when checking out a Compiler license | 无 |
-z path | 指定库文件和包含文件的路径 | 无 |
-? | 显示帮助信息 | 无 |
相关文章推荐
- Matlab中guidata()的用法以及如何帮助参数在GUI间传递
- Git 命令参数及用法详解 & Linux编程环境下版本控制 Git使用
- java学习-【转】JVM JSTAT命令的用法和参数讲解
- linux chmod命令(文件文件夹权限设定命令)参数及用法详解
- Matlab的GUI参数传递方式
- linux groupdel命令参数及用法详解(linux删除用户组命令)
- linux chmod命令参数及用法详解--文件文件夹权限设定命令
- linux swapon命令参数及用法详解---开启linux交换分区swap
- linux下串口编程VTIME和VMIN参数的用法
- matlab gui 编程
- matlab GUI 编程——mcc转换m文件到应用程序
- linux eval命令参数及用法
- rpm命令及参数用法
- yum命令及参数用法
- linux umount命令参数及用法详解---linux卸载文件系统命令
- linux du命令参数及用法详解---linux统计磁盘空间大小命令
- Matlab的GUI参数传递方式
- Linux date命令参数及用法详解
- linux sed命令参数及用法详解---linux 利用script来处理文本文
- linux unzip命令参数及用法详解--linux解压zip文件命令