Open timvickery opened 1 year ago
@timvickery thanks for opening the issue. I may have an alternative solution that (at least) works on Octave. (I don't have access to an Mac M series computer). Can you try the code in https://github.com/nno/surfing/pull/6 and see if that resolves the issue?
I received the below error when running surface_compile_mex.m on R2023a (Mac M-series proc). What worked for me was to add -DMX_COMPAT_32 flag to the mex call in question, in compile_mex.m in the toolbox_fast_marching subdirectory.
Error using mex /Users/tvickery/surfing/toolbox_fast_marching/mex/perform_front_propagation_3d_mex.cpp:87:12: error: no matching function for call to 'mxCreateNumericArray_730' plhs[0] = mxCreateNumericArray(3, dims, mxDOUBLE_CLASS, mxREAL ); ^
~~~~~~~ /Applications/MATLAB_R2023a.app/extern/include/matrix.h:299:30: note: expanded from macro 'mxCreateNumericArray'define mxCreateNumericArray mxCreateNumericArray_730
/Applications/MATLAB_R2023a.app/extern/include/matrix.h:969:1: note: candidate function not viable: no known conversion from 'int[3]' to 'const mwSize ' (aka 'const unsigned long ') for 2nd argument mxCreateNumericArray(mwSize ndim, const mwSize *dims, mxClassID classid, mxComplexity flag); ^ /Applications/MATLAB_R2023a.app/extern/include/matrix.h:299:30: note: expanded from macro 'mxCreateNumericArray'
define mxCreateNumericArray mxCreateNumericArray_730
/Users/tvickery/surfing/toolbox_fast_marching/mex/perform_front_propagation_3d_mex.cpp:92:13: error: no matching function for call to 'mxCreateNumericArray_730' plhs[1] = mxCreateNumericArray(3, dims, mxDOUBLE_CLASS, mxREAL ); ^
~~~~~~~ /Applications/MATLAB_R2023a.app/extern/include/matrix.h:299:30: note: expanded from macro 'mxCreateNumericArray'define mxCreateNumericArray mxCreateNumericArray_730
/Applications/MATLAB_R2023a.app/extern/include/matrix.h:969:1: note: candidate function not viable: no known conversion from 'int[3]' to 'const mwSize ' (aka 'const unsigned long ') for 2nd argument mxCreateNumericArray(mwSize ndim, const mwSize *dims, mxClassID classid, mxComplexity flag); ^ /Applications/MATLAB_R2023a.app/extern/include/matrix.h:299:30: note: expanded from macro 'mxCreateNumericArray'
define mxCreateNumericArray mxCreateNumericArray_730
/Users/tvickery/surfing/toolbox_fast_marching/mex/perform_front_propagation_3d_mex.cpp:102:13: error: no matching function for call to 'mxCreateNumericArray_730' plhs[2] = mxCreateNumericArray(3, dims, mxDOUBLE_CLASS, mxREAL ); ^
~~~~~~~ /Applications/MATLAB_R2023a.app/extern/include/matrix.h:299:30: note: expanded from macro 'mxCreateNumericArray'define mxCreateNumericArray mxCreateNumericArray_730
/Applications/MATLAB_R2023a.app/extern/include/matrix.h:969:1: note: candidate function not viable: no known conversion from 'int[3]' to 'const mwSize ' (aka 'const unsigned long ') for 2nd argument mxCreateNumericArray(mwSize ndim, const mwSize *dims, mxClassID classid, mxComplexity flag); ^ /Applications/MATLAB_R2023a.app/extern/include/matrix.h:299:30: note: expanded from macro 'mxCreateNumericArray'
define mxCreateNumericArray mxCreateNumericArray_730
3 errors generated.
Error in compile_mex (line 3) mex mex/perform_front_propagation_3d.cpp mex/perform_front_propagation_3d_mex.cpp mex/fheap/fib.cpp
Error in surfing_compile_mex (line 27) eval(e)