c:\matlab6p5\extern\include\cpp\dblmtrx.h(517) : error C2440: '=' : cannot convert from 'void *' to 'struct mxArray_tag *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
c:\matlab6p5\extern\include\cpp\mlmif.h(9) : error C2440: '=' : cannot convert from 'void *' to 'struct mxArray_tag *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
都是这类的问题,即在诸如:
inline mwArray _colonobj(const mwArray &in1=mwArray::DIN, const mwArray &in2=mwArray::DIN, const mwArray &in3=mwArray::DIN)
{
int nrhs = 0;
int nlhs = 1;
MatlabMatrix *plhs[1];
plhs[0] = NULL;
MatlabMatrix *prhs[3];
if (!in1.IsDIN()) {
prhs[nrhs++] = in1.GetData();
if (!in2.IsDIN()) {
prhs[nrhs++] = in2.GetData();
if (!in3.IsDIN()) {
prhs[nrhs++] = in3.GetData();
}
}
}
mlx_colonobj(nlhs, plhs, nrhs, prhs);
return plhs[0];
}
代码中plhs[0] = NULL;错了
请问是不是我的版本太低,导致对class 和 struct的不好的兼容。
哪位高手能给我一个详细而完整的解决方案,非常感谢。
假如您有时间,可以加我的QQ:304646673说一下么?