使用matlab编译器生成EXE文件
2016-03-10 19:16
375 查看
使用matlab编译器生成EXE文件
(2012-09-03 16:58:15)标签:
| 分类: matlab |
然后在command window中作如下设置:
>> mbuild -setup
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? n
Select a compiler:
[1] Lcc-win32 C 2.4.1
[2] Microsoft Visual C++ 6.0
[3] Microsoft Visual C++ .NET 2003
[4] Microsoft Visual C++ 2005 SP1
[5] Microsoft Visual C++ 2008 Express
[6] Microsoft Visual C++ 2008 SP1
[0] None
Compiler: 6
The default location for Microsoft Visual C++ 2008 SP1 compilers is C:\Program Files\Microsoft Visual Studio 9.0,
but that directory does not exist on this machine.
Use C:\Program Files\Microsoft Visual Studio 9.0 anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files\Microsoft Visual Studio 9.0] D:\Program Files\Microsoft Visual Studio 9.0
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 SP1
Location: D:\Program Files\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
****************************************************************************
Warning: Applications/components generated using Microsoft Visual Studio
2008 require that the Microsoft Visual Studio 2008 run-time
libraries be available on the computer used for deployment.
To redistribute your applications/components, be sure that the
deployment machine has these run-time libraries.
****************************************************************************
Trying to update options file: C:\Documents and Settings\feiyuan\Application Data\MathWorks\MATLAB\R2009a\compopts.bat
From template: D:\PROGRA~1\MATLAB\R2009a\bin\win32\mbuildopts\msvc90compp.bat
Done . . .
设置完后,即可创建EXE文件了。(以peak.m文件为例)
在command window中输入:
mcc -m peak.m
这样在你设置的目录中即可生成一个名为peak的EXE文件。
注意:
mcc -m peak.m命令中mcc与-之间有空格;
只有M函数文件才能生成EXE文件
如果在M文件的第一行有注释,在执行mcc -m后,会有如下提示:
Warning: MATLAB Toolbox Path Cache is out of date and is not being used.
Type ‘help toolbox_path_cache’ for more info
相关文章推荐
- (笔记) MATLAB 文本的高级控制,极坐标图
- matlab中统计工具箱函数大全
- 双边滤波Matlab实现<The Bilateral Filter>
- Matlab和java混合编程开发
- matlab s变换
- 文章标题Matlab GUI学习笔记(一)function “funcname” 工作区和基本工作区
- (笔记) MATLAB 图像增强
- (笔记) MATLAB 关系运算 逻辑运算
- Matlab 中一些符号的含义
- matlab可以使用detrend函数去除时间序列x中的均值或线性趋势,这在FFT处理中尤其常用。
- PCA (主成分分析)详解 (写给初学者) 结合matlab
- 【3.10】matlab中批量读取图像
- 振动信号的预处理方法-detrend
- 我喜欢的智慧石资源
- Matlab中读取txt文件的几种方法
- Save .mat file in older version matlab
- 痛苦的并行之路----MATLAB工具箱安装
- paper 39 :Matlab绘制误差棒图(errorbar函数的使用)
- (笔记)MATLAB 绘图命令
- MATLAB 常用函数笔记