目录
MATLAB2021b\toolbox\toolbox_fast_marching
报错
F:\MATLAB2021b\toolbox\toolbox_fast_marching\mex\perform_front_propagation_3d_mex.cpp: In function 'void
mexFunction(int, mxArray**, int, const mxArray**)':
F:\MATLAB2021b\toolbox\toolbox_fast_marching\mex\perform_front_propagation_3d_mex.cpp:90:36: error: cannot convert
'int*' to 'const mwSize*' {aka 'const long long unsigned int*'}
plhs[0] = mxCreateNumericArray(3, dims, mxDOUBLE_CLASS, mxREAL );
措施
进入文件compile_mex.m 添加 compatibleArrayDims 开关将mwSize 和 int 等同
% mex mex/perform_front_propagation_3d.cpp mex/perform_front_propagation_3d_mex.cpp mex/fheap/fib.cpp
mex -compatibleArrayDims mex/perform_front_propagation_3d.cpp mex/perform_front_propagation_3d_mex.cpp mex/fheap/fib.cpp