预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共11页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

首先运行mbuild–setup.进行相应设置,运行结果如下: >>mbuild-setup PleasechooseyourcompilerforbuildingstandaloneMATLABapplications: Wouldyoulikembuildtolocateinstalledcompilers[y]/n?y Selectacompiler: [1]Lcc-win32C2.4.1inC:\MATLAB~1\sys\lcc [2]MicrosoftVisualC++6.0inC:\ProgramFiles\MicrosoftVisualStudio [0]None Compiler:2 Pleaseverifyyourchoices: Compiler:MicrosoftVisualC++6.0 Location:C:\ProgramFiles\MicrosoftVisualStudio Arethesecorrect?([y]/n):y Tryingtoupdateoptionsfile:C:\DocumentsandSettings\ck@wj\ApplicationData\MathWorks\MATLAB\R2007a\compopts.bat Fromtemplate:C:\MATLAB~1\bin\win32\mbuildopts\msvc60compp.bat Done... -->"C:\MATLAB~1\bin\win32\mwregsvrC:\MATLAB~1\bin\win32\mwcomutil.dll" DllRegisterServerinC:\MATLAB~1\bin\win32\mwcomutil.dllsucceeded -->"C:\MATLAB~1\bin\win32\mwregsvrC:\MATLAB~1\bin\win32\mwcommgr.dll" DllRegisterServerinC:\MATLAB~1\bin\win32\mwcommgr.dllsucceeded 2、打开DEPLOYTOOL工具,进行相应选择和输入 >>deploytool -----creatanewdeploymentprojiect -----MATLABbuildfor.NET -----genericcomcomponent ------name:shiyan.prj ------location:D:\COM 3、建立M文件,直接拷贝代码 functiony=mymagic(x) y=magic(x); 保存完毕 4、addthefile 5、deploymentprojectsetting MCRoption 6、buildtheproject 编译结果如下: Buildoutput(2008-12-2715:52:50). mcc-F'D:\COM\shiyan.prj' mcc-Wcom:shiyan,shiyanclass,1.0-dD:\COM\shiyan\src-Tlink:lib-vclass{shiyanclass:D:\COM\mymagic.m} mcc-Wcom:shiyan,shiyanclass,1.0-dD:\COM\shiyan\src-Tlink:lib-vclass{shiyanclass:D:\COM\mymagic.m} Compilerversion:4.6(R2007a) ProcessingC:\MATLABR2007a\toolbox\matlab\mcc.enc ProcessingC:\MATLABR2007a\toolbox\database\mcc.enc Processingincludefiles... 2item(s)added. ProcessingdirectoriesinstalledwithMCR... ThefileD:\COM\shiyan\src\mccExcludedFiles.logcontainsalistoffunctionsexcludedfromtheCTFarchive. 2item(s)added. GeneratingMATLABpathforthecompiledapplication... Created37pathitems. BeginvalidationofMEXfiles:SatDec2715:53:222008 Validating'C:\MATLABR2007a\toolbox\compiler\deploy\deploywhich.mexw32'. NoconflictingM-filefound. Validating'