Skip to content

mex error with Xcode 13.2.1 #29

@josejmunoz

Description

@josejmunoz

Hello. When compiling in Apple M1 machine (version 12.0.1) function mirt3D_mexinterp.cpp with

mex mirt3D_mexinterp.cpp

I get the errors related to conversion of types from 'const mwSize *' to 'const int *'. Has any body got similar errors? Sorry if this has already been reported.

Detail of the output error is as follows:

Building with 'Xcode Clang++'.
Error using mex
/Users/Code/FIDVC-1.2.4_2D/MatlabCode/Supplemental
MFiles/mirt3D_mexinterp.cpp:173:13: error: incompatible pointer types assigning to 'const int *' from 'const mwSize *' (aka 'const
unsigned long *')
Xdims = mxGetDimensions(IN_S);
^~~~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2021b.app/extern/include/matrix.h:277:25: note: expanded from macro 'mxGetDimensions'
#define mxGetDimensions mxGetDimensions_730

/Users/josemunoz/Dropbox/research/MasterThesis/AngelIBMB/AngleEnriqueJose/Code/FIDVC-1.2.4_2D/MatlabCode/Supplemental
MFiles/mirt3D_mexinterp.cpp:177:12: error: incompatible pointer types assigning to 'const int *' from 'const mwSize *' (aka 'const
unsigned long *')
dims = mxGetDimensions(IN_Z);
^~~~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2021b.app/extern/include/matrix.h:277:25: note: expanded from macro 'mxGetDimensions'
#define mxGetDimensions mxGetDimensions_730
^
/Users/Code/FIDVC-1.2.4_2D/MatlabCode/Supplemental
MFiles/mirt3D_mexinterp.cpp:203:13: error: no matching function for call to 'mxCreateNumericArray_730'
OUT_F = mxCreateNumericArray(newXndim, newdims, mxDOUBLE_CLASS, mxREAL);
^~~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2021b.app/extern/include/matrix.h:285:30: note: expanded from macro 'mxCreateNumericArray'
#define mxCreateNumericArray mxCreateNumericArray_730
^~~~~~~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2021b.app/extern/include/matrix.h:955:1: note: candidate function not viable: no known conversion from 'int *'
to 'const mwSize *' (aka 'const unsigned long *') for 2nd argument
mxCreateNumericArray(mwSize ndim, const mwSize *dims, mxClassID classid, mxComplexity flag);
^
/Applications/MATLAB_R2021b.app/extern/include/matrix.h:285:30: note: expanded from macro 'mxCreateNumericArray'
#define mxCreateNumericArray mxCreateNumericArray_730

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions