创建动态链接库主要有两种方法: 一种是使用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

-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:fooC 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:

lib:

none com:compname,clname,version

-Y licensefile

Use licensefile when checking out a Compiler license

-z path

指定库文件和包含文件的路径

-?

显示帮助信息

Feedback

matlab中codegen是什么,matlab中mcc编译器参数的含义相关推荐

  1. matlab mcc 参数,matlab中mcc编译器参数的含义

    创建动态链接库主要有两种方法: 一种是使用Matlab 为VC++ IDE提供的Add-in.这种方法比较简单,方便快捷,只要在VC++中创建工程的时候选择Matlab Project Wizard, ...

  2. matlab中codegen是什么,从 MATLAB 代码生成 C/C++ 代码。 - MATLAB codegen - MathWorks 中国...

    -c生成 C/C++ 代码,但不调用 make 命令. -config:dll使用默认配置参数生成动态 C/C++ 库. -config:exe使用默认配置参数生成静态 C/C++ 可执行文件. -c ...

  3. 在matlab中 编程n,Matlab与C++混合编程 1--在C++中调用自己写的matlab函数

    在Visual Studio中使用C++中调用MATLAB程序 在matlab中可以通过mbuild工具将.m文件编译成dll文件供外部的C++程序调用,这样就可以实现matlab和C++混合编程的目 ...

  4. matlab 脚本是什么意思,MATLAB提示不能在脚本中定义函数,是什么意思?

    点击查看MATLAB提示不能在脚本中定义函数,是什么意思?具体信息 答:你试图在命令窗口定义函数,这种做法是错误的. 你需要建立一个.m文件,文件名是Chebyshev.m,然后在里面输入源程序. 答 ...

  5. matlab 画 矩阵点,在MATLAB中绘制矩阵中点之间的线

    3 个答案: 答案 0 :(得分:1) 这适用于我的数据结构: data = [ 0, 0, 1, 0;... 1, 0, 1, 1;... 1, 1, 0, 1;... 0, 1, 0, 0 ... ...

  6. matlab中conv滤波,其中是Matlab(imfilter)和TensorFlow中偶数滤波器(6x6)的中心像素(转速表nn.conv2d)?...

    在我的硕士论文中,我正在将一个卷积操作从一个Matlab代码移植到TensorFlow(pythonapi)中.例外的是,在Matlab中使用了一个均匀的滤波器大小(6x6).在 通过调试Matlab ...

  7. matlab sae模型,matlab的Deep Learning的toolbox 中的SAE算法

    ========================================================================================== 最近一直在看Dee ...

  8. matlab中给图像加几个矩形框_在图像中画矩形框(matlab)

    参考代码:https://github.com/cuijiaxun/FaceRecognitionByMatlab 中的LabelDetectWindow.m 在目标检测的时候,一般都需要用矩形框圈出 ...

  9. python变量存为matlab,详解如何在python中读写和存储matlab的数据文件(*.mat)

    背景 在做deeplearning过程中,使用caffe的框架,一般使用matlab来处理图片(matlab处理图片相对简单,高效),用python来生成需要的lmdb文件以及做test产生结果.所以 ...

  10. Matlab篇(二)MATLAB中addpath的用法 (转)

    MATLAB help 中的语法: addpath('folderName1','folderName2','folderName3' ...) addpath('folderName1','fold ...

最新文章

  1. 冒号课堂§2.4:并发范式
  2. 自定义消息编码绑定实现
  3. oracle rtrim(),Oracle ltrim() rtrim() 函数详细用法
  4. 20160402javaweb 开发模式
  5. Chrome升级 76.0.3809.87后 GreenChrome无法使用的办法
  6. 开源商城小程序源码(小程序商城完整版源码)附搭建部署教程
  7. php分页类函数,php分页类的使用方法
  8. BLOB/TEXT column 'name' used in key specification without a key length
  9. 修改jar 注入_ORA00600[16703]安装介质注入型勒索病毒恢复案例
  10. JAVA工具类(17)--Java导入导出Excel工具类ExcelUtil
  11. 名帖105 赵孟頫 楷书《玄妙观重修三门记》
  12. 修改Switch开关按钮的颜色
  13. vue路由传参的三种方式区别(params,query)
  14. SketchUp Pro2023安装包下载及安装教程
  15. Rocketmq原理与实践
  16. Springboot毕设项目绩效考核管理系统m29awjava+VUE+Mybatis+Maven+Mysql+sprnig)
  17. Delphi XE下获取网页源码记录
  18. stata学习笔记|受限被解释变量
  19. jenkins 集成 redmine 账户验证的方案
  20. This Week in Spring - July 2nd, 2013

热门文章

  1. AOJ-AHU-OJ-675 定位赛
  2. 证券交易系统搭建的架构方案
  3. java 提高随机数效率_抢拍神器的关键:优化提升Java线程局部随机数ThreadLocalRandom高并发技巧 - alidg...
  4. nginx配置长链接
  5. 崔云php_佘家村里的“茉莉香”
  6. c#关于GMap离线地图加载的问题
  7. Python量化交易学习笔记(50)——程序化交易1
  8. 基于环信的开源即时通讯项目
  9. Android ANR日志分析总结
  10. java银行账户类_使用Java编写银行账户类(面向对象思考实验)