Matlab编译COM组件的解决方案
解决方法如下:(蓝色字体为用户输入命令)
>>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] Borland C++Builder version 6.0
[2] Borland C++Builder version 5.0
[3] Borland C++Builder version 4.0
[4] Borland C++Builder version 3.0
[5] Borland C/C++ version 5.02
[6] Borland C/C++ version 5.0
[7] Borland C/C++ (free command line tools) version 5.5
[8] Lcc C version 2.4
[9] Microsoft Visual C/C++ version 7.0
[10] Microsoft Visual C/C++ version 6.0
[11] Microsoft Visual C/C++ version 5.0
[0] None
Compiler: 9
The default location for Microsoft Visual C/C++ compilers is C:\Program Files\Microsoft Visual Studio .NET, but that directory does not exist on this machine.
Use C:\Program Files\Microsoft Visual Studio .NET anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files\Microsoft Visual Studio .NET] D:\Program Files\Microsoft Visual Studio .NET 2003 (用户根据VC/VS.net的安装目录进行相应更改)
Please verify your choices:
Compiler: Microsoft Visual C/C++ 7.0
Location: D:\Program Files\Microsoft Visual Studio .NET 2003
Are these correct?([y]/n): y
The default options file:
"C:\Documents and Settings\tutuya\Application Data\MathWorks\MATLAB\R13\compopts.bat"
is being updated from D:\MATLAB6P5\BIN\WIN32\mbuildopts\msvc70compp.bat...
--> "D:\MATLAB6p5\bin\win32\mwregsvr D:\MATLAB6p5\bin\win32\mwcomutil.dll"
DllRegisterServer in D:\MATLAB6p5\bin\win32\mwcomutil.dll succeeded
--> "D:\MATLAB6p5\bin\win32\mwregsvr D:\MATLAB6p5\bin\win32\mwcommgr.dll"
DllRegisterServer in D:\MATLAB6p5\bin\win32\mwcommgr.dll succeeded
>>mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Borland C++Builder version 6.0
[2] Borland C++Builder version 5.0
[3] Borland C++Builder version 4.0
[4] Borland C++Builder version 3.0
[5] Borland C/C++ version 5.02
[6] Borland C/C++ version 5.0
[7] Borland C/C++ (free command line tools) version 5.5
[8] Compaq Visual Fortran version 6.1
[9] Compaq Visual Fortran version 6.6
[10] Digital Visual Fortran version 6.0
[11] Digital Visual Fortran version 5.0
[12] Lcc C version 2.4
[13] Microsoft Visual C/C++ version 7.0
[14] Microsoft Visual C/C++ version 6.0
[15] Microsoft Visual C/C++ version 5.0
[16] WATCOM C/C++ version 11
[17] WATCOM C/C++ version 10.6
[0] None
Compiler: 13
The default location for Microsoft Visual C/C++ compilers is C:\Program Files\Microsoft Visual Studio .NET,
but that directory does not exist on this machine.
Use C:\Program Files\Microsoft Visual Studio .NET anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files\Microsoft Visual Studio .NET] D:\Program Files\Microsoft Visual Studio .NET 2003 (用户根据VC/VS.net的安装目录进行相应更改)
Please verify your choices:
Compiler: Microsoft Visual C/C++ 7.0
Location: D:\Program Files\Microsoft Visual Studio .NET 2003
Are these correct?([y]/n): y
The default options file:
"C:\Documents and Settings\tutuya\Application Data\MathWorks\MATLAB\R13\mexopts.bat"
is being updated from D:\MATLAB6P5\BIN\WIN32\mexopts\msvc70opts.bat...
C/C++编译器配置成功!