VC编译器使用Malab_Com组件的方法.docVIP

  • 2
  • 0
  • 约4.96千字
  • 约 7页
  • 2017-05-13 发布于贵州
  • 举报
VC编译器使用Malab_Com组件的方法

本文根据作者亲自在VISUAL C++ 6.0编译器环境下,实现了MATLAB中COM组件的开发而写成。此方法的实现是在网上各位前辈的基础上完成的。现在,就具体谈一下怎么把一个M文件或MEX文件,做成可以脱离MATLAB环境的COM组件,并且被VC++调用。 首先,设置合适的编译器。在MATLAB命令窗口里敲:mbuild –setup 和 mex –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 C:\MATLAB7\sys\lcc [2] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio [0] None Compiler: 2 ● Please verify your choices: Compiler: Microsoft Visual C/C++ 6.0 Location: C:\Program Files\Microsoft Visual Studio Are these correct?([y]/n): y ● Try to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14\compopts.bat From template: C:\MATLAB7\BIN\WIN32\mbuildopts\msvc60compp.bat Done . . . -- C:\MATLAB7\bin\win32\mwregsvr C:\MATLAB7\bin\win32\mwcomutil.dll DllRegisterServer in C:\MATLAB7\bin\win32\mwcomutil.dll succeeded -- C:\MATLAB7\bin\win32\mwregsvr C:\MATLAB7\bin\win32\mwcommgr.dll DllRegisterServer in C:\MATLAB7\bin\win32\mwcommgr.dll succeeded ● Please choose your compiler for building external interface (MEX) files: Would you like mex to locate installed compilers [y]/n? y ● Select a compiler: [1] Digital Visual Fortran version 6.0 in C:\Program Files\Microsoft Visual Studio [2] Lcc C version 2.4 in C:\MATLAB7\sys\lcc [3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio [0] None Compiler: 3 ● Please verify your choices: Compiler: Microsoft Visual C/C++ 6.0 Location: C:\Program Files\Microsoft Visual Studio Are these correct?([y]/n): y Try to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14\mexopts.bat From template: C:\MATLAB7\BIN\WIN32\mexopts\msvc60opts.bat Done . . . 设置系统路径。我的电脑-属性-高级-环境变量-系统变量-Path选项,增加以下路径: 头文件: C:\MATLAB7\extern\include; 库: C:\MATLAB7\extern\lib\win32\microsoft\msvc60; DLL: C:\MATLA

文档评论(0)

1亿VIP精品文档

相关文档