MATLAB: Make 32 and 64 bit executable

MATLAB Compiler

Hello!
I have a script that makes an executable for an application. We used to just create a 64bit executable, but now we want a 32bit executable as well. I installed the 32bit MATLAB, but now whenever I create the 64bit executable it crashes right after starting (Windows', "x.exe has stopped working" error).
I have tried changing the compiler, but it has not had an effect.
How can I fix this?
Thanks!

Best Answer

What crashes: MATLAB while compiling, or your application while running on the target computer? You need to be running the 32 bit version of MATLAB when you compile an executable for a 32 bit computer, and you need to be running the 64 bit version of MATLAB when you compile an executable for a 64 bit computer. You can do both of these on your 64 bit computer - you don't need a 32 bit computer. But you do need to re-run "mbuild - setup" (or so I've been told) whenever you switch from compiling on one version to compiling on the other version.
Related Question