Search code examples
matlabsimulinkmex

Why is Simulink generating .mexw64 files on Windows 64bit?


I am using Matlab R2015b (Simulink 8.6) on Windows 7 Enterprise. I noticed that sometimes, .mexw64 files are generated based on .slx files, for instance: model.slx -> model_sfun.mexw64. Why is this happening? Is this related to the generation of the slprj folder?

Note that I am using a (big) Simulink model originally made by someone else. I do not know all its details. Maybe it was set to generate the .mexw64 files?


Solution

  • Simulink generates *.mexw64 files on a 64-bit Windows architecture (*.mexw32 on a 32-bit Windows architecture) for any of the following as part of its code generation process:

    • MATLAB Function blocks
    • Stateflow charts
    • Referenced models (in accelerated mode)
    • S-functions
    • if the model itself is set to run in accelerated mode

    and there may be others I am forgetting. The files are part of the normal code generation process and are essentially DLL files (with a different extension). There's nothing to do about them, you don't need to worry about it.

    See also this related question on MATLAB Central.