求救:matlab7.2(2006a)如何与vc++6.0进行接口配置实现混合编程

来源:百度知道 编辑:UC知道 时间:2024/06/12 05:15:08
我安装有matlab7.2(2006a)和vc++6.0,在matlab中键入mex -setup进行环境配置时,提示一个警告,设置不成功。
>> mex -setup
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] Lcc C version 2.4.1 in D:\PROGRAM FILES\MATLAB\R2006A\sys\lcc
[2] Microsoft Visual C/C++ version 6.0 in D:\Program Files\Microsoft Visual Studio

[0] None

Compiler: 2

Please verify your choices:

Compiler: Microsoft Visual C/C++ 6.0
Location: D:\Program Files\Microsoft Visual Studio

Are these correct?([y]/n): y

Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2006a\mexopts.bat
From template: D:\PROGRAM FILES\MATLAB\R2006A\BIN\win32\mexopts\msvc60opts.bat <

这个说明你已经配置成功了。
matlab 7.1以后用mex编译的cpp或c函数都会成为后缀名为.mexw32,其功能和dll文件是一样的。
写一段程序或者编译运行一下\extern\examples\mex中的例子就知道了。