创建动态链接库主要有两种方法: 一种是使用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. 在Windows下使用make命令
  2. java.lang包 下
  3. CVE-2016-0095提权漏洞学习笔记
  4. 各纬度气候分布图_读中国年平均气温分布图,寻找中国全年平均气温最高和最低的地方...
  5. 【2】基于zookeeper,quartz,rocketMQ实现集群化定时系统
  6. OpenCV2:幼儿园篇 第一章 创建图像并显示
  7. 安装mysql数据库要注意的
  8. python获取上个月最后一天_在Python中获取本月的最后一天
  9. 802.11 对于multicast 和 broadcast的处理
  10. java中substring的使用方法
  11. Alibaba之EasyExcel使用
  12. 为什么程序员很难找到合适的另一半?
  13. ftp服务器文件不让上传,ftp服务器不让上传文件
  14. vue 引入 element-ui 报 es2015 的错
  15. 用计算机处理表格说课稿,信息技术《电子表格的特点及应用》的说课稿
  16. 在线视频网站加密技术详解
  17. Ext.TabPanel学习
  18. 网易云音乐热评的规律,44万条数据告诉你
  19. R语言独立性检验-基础
  20. 掌控板教程 | 搞定 Siri 语音控制,只要半小时!

热门文章

  1. Docker - Docker Image及Image命令详解
  2. oracle database lite,Oracle Database Lite Client 10
  3. Win10 LTSB/LTSC安装微软商店/Microsoft store
  4. ORA-22835:缓冲区对于CLOB到CHAR转换而言太小
  5. 关于MybatisPlus
  6. eighth day for learning
  7. java excel添加公式_Java 添加、读取 Excel 公式
  8. 23万字 前端HTML与CSS学习笔记总结篇(超详细)
  9. DSP指纹识别系统硬件设计
  10. 图像加密--chua's chaos and baker's transformation