Platform Compatibility

Verify the MEX File Is Built for Your Platform

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 the following table. To determine the extension for your platform, use the mexext function.

MEX-File Platform-Dependent Extension

PlatformBinary MEX-File Extension

Linux® (64-bit)


Apple Mac (64-bit)


Microsoft® Windows® (32-bit)


Windows (64-bit)


Verify Your Architecture on Windows Platforms

Verify the MEX file is for the same architecture, 32- vs. 64-bit.

On non-Windows platforms, MATLAB® is supported for 64-bit architectures only.

More About

Was this topic helpful?