Main Content

MEX Platform Compatibility

If you obtain a binary MEX file from another source, be sure that the file was compiled for the same platform on which you want to run it. The file extension reflects the platform, as shown in this table. To determine the extension for your platform, use the mexext function.

MEX File Platform-Dependent Extension

PlatformBinary MEX File Extension

Windows®

mexw64

Linux®

mexa64

macOS with Apple silicon

mexmaca64

macOS with Intel®

mexmaci64

Note

MEX files built on macOS with Intel are not supported on the Apple silicon platform using Rosetta 2.

Note

It is not possible to run a 32-bit MEX file from within a 64-bit version of MATLAB®.

See Also

Related Topics