vc++6.0与Matlab 7.0混合编程
最近想在vc++中调用MATLAB的com组件,按照网上的例子写了一个*。m文件。
add.m文件为:
function m=add(a,b)
m=a+b;
但在用MATLAB的comtool生成dll等文件时报错。mex和mbuild已设置好,使用vc++6.0.
:::
errordialog为
Jave exception occured:
java.lang.ArrayIndexOutOfBoundsException:1>=1
at java.utilvector:elementat{UnKnow source}
at jave.swing.Jlist$5.getElementAt{UnKnow souce}.
Build status如下
Building COM object...
mcc -M -silentsetup -d 'G:/matlab/work/test/src' -B 'ccom:test,testclass,1.0' 'G:/matlab/work/add.m'
G:/MATLAB/BIN/WIN32//../MEX.PL: Error: IDL compile of 'mwcomtypes.idl' failed.
Creating distrib directory.
Moving files to distrib.
不知道为什么出现错误,哪位使用过这种方法请指点一下。