[New Formulation after only 5 views and no answer after 3 days]
I want to compile a C file under different Matlab versions preferrably with the same command. I know these directives for the mex command:
- -compatibleArrayDims (32-bit C-Matrix-API)
- -DMX_COMPAT_32 (32-bit C-Matrix-API)
- -largeArrayDims (64-bit C-Matrix-API)
- -2017b (separate complex data, C-Matrix-API: mxGetPr)
- -2018a (interleaved complex numbers, C-Data-API: mxGetData)
The first 2 are equivalent and the default under <= R2015b/32, as far as I know. My codes are 64 bit clean and use the C-Matrix-API e.g. the mxGetPr() command, so the 32 bit flags are needed only to support olöd 32 bit systems.
I want to compile with largeArrayDims (64 bit arrays) and the C-Matrix-API:
mex -O -largeArrayDims -R2017b test.c
But under R2018b this fails with the message:
*** Compilation failed:Calling MEX with both 'R2017b' and 'largeArrayDims' not supported.
Why? I thought, that these directives are not mutually exclusive, but equivalent.
Do I need different flags for calling mex under R2016b and R2018b?
Some corresponding pages, which does not clarify the question:
Best Answer