![](https://csdnimg.cn/release/download_crawler_static/5925229/bg5.jpg)
1.安装 C 编译器(前提是你的电脑已经安装了 VC)
>> mbuild -setup
%注意:'-'的后面紧跟 setup
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc C version 2.4 in D:\MATLAB7\sys\lcc
[2] Microsoft Visual C/C++ version 6.0 in D:\Microsoft Visual Studio
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C/C++ 6.0
Location: D:\Microsoft Visual Studio
Are these correct?([y]/n): y
Try to update options file: C:\Documents and Settings\Leki\Application
Data\MathWorks\MATLAB\R14\compopts.bat
From template: D:\MATLAB7\BIN\WIN32\mbuildopts\msvc60compp.bat
Done . . .
--> "D:\MATLAB7\bin\win32\mwregsvr D:\MATLAB7\bin\win32\mwcomutil.dll"
DllRegisterServer in D:\MATLAB7\bin\win32\mwcomutil.dll succeeded
--> "D:\MATLAB7\bin\win32\mwregsvr D:\MATLAB7\bin\win32\mwcommgr.dll"
DllRegisterServer in D:\MATLAB7\bin\win32\mwcommgr.dll succeeded
2.在 MATLAB 中,将 M 文件编译成 exe(可执行)文件
定位于包含 meun.m,meun.fig 的文件路径下。在 command windows 下输入:
>> mcc -m meun.m
To get started, select MATLAB Help or Demos from the Help menu.
Warning: No matching builtin function available for
D:\MATLAB7\toolbox\simulink\simulink\set_param.bi
>>
这里出现了上面警告 Warning 其解决方法如下:
将 \MATLAB7\toolbox\compiler\deploy\matlabrc.m 中的