- 1、本文档共5页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
基于com组件的Matlab R2009a与C#.NET2010的交互编程
基于com组件的MATLAB R2009a与C#.NET2010的交互编程
1、在MATLAB 中配置编译COM的环境
在进行配置前情确认安装了VS2010 (含C#.NET )和.NET Framework 2.0,
这还不是很确定是否需要安装,但是编译的过程需要。
启动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?
输入“y”,显示如下:
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 SP1
Location: C:\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:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2009a\compopts.bat From
template: C:\PROGRA~1\MATLAB\R2009a\bin\win32\mbuildopts\msvc90compp.bat
Done . . .
2、使用MATLAB 定制COM 组件
deploytool
产生deployment tool 配置窗口。
1)点击新建“Create a new deployment project” ;
2 )选择“MATLAB Builder NE ”、“.NET Component”,输入工程名Proj1 (此
项目名称就是生成的dll 文件名),选择好项目所在路径,点击“OK”,在窗口
“Dep
文档评论(0)