Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mex error with Xcode 13.2.1 #29

Open
josejmunoz opened this issue Feb 20, 2022 · 1 comment
Open

mex error with Xcode 13.2.1 #29

josejmunoz opened this issue Feb 20, 2022 · 1 comment

Comments

@josejmunoz
Copy link

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

@ALandauer
Copy link
Collaborator

Apologies for the delay - there doesn't seem to be anyone in the Franck Lab monitoring this repo, unfortunately. Hopefully you've found a solution, but in case not I'll mention a few things.

As far as I know we've never tested on the A1+Xcode platform, and mex compatibility on anything other than Windows+Intel complier can be spotty even on more conventional hardware in my experience. I don't recall if I ever actually got the mex working on my own Intel MBP, but that specifically is not an error I recall seeing before.

That said, if you want to use A1 hardware I'd recommend trying the built-in interp functions. For more info see my reply to Issue #23 and also take a look at here for a non-mex way to run the interpolation (in 2D, for that case).

Cheers,
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants