Im trying to MEX piece of code with VS 2010 MATLAB 2012b and getting this error
c:\users\krzysztof\desktop\libocas_v096\libocas_v096\sparse_mat.h(27) : error C2371: 'mxArray' : redefinition; different basic types c:\program files\matlab\r2012b\extern\include\matrix.h(293) : see declaration of 'mxArray'
the code contains #include which includes matrix.h
another piece code includes sparse_mat.h which redefines matrix.h types e.g.
typedef struct {
INDEX_TYPE_T *ir;
INDEX_TYPE_T *jc;
INDEX_TYPE_T m;
INDEX_TYPE_T n;
double *pr;
NNZ_TYPE_T nzmax;
int sparse;
} mxArray;
Any idea how to get rid of this error ?? GCC compiles this code.
Krzysztof
it complains about line 293. Below part from matrix.h with this line
#ifndef MATHWORKS_MATRIX_MXARRAY_PUB_FWD_H
#define MATHWORKS_MATRIX_MXARRAY_PUB_FWD_H
/* Copyright 2008 The MathWorks, Inc. */
/**
* Published incomplete definition of mxArray
*/
typedef struct mxArray_tag mxArray; <--- line 293
#endif /* MATHWORKS_MATRIX_MXARRAY_PUB_FWD_H */