MATLAB: How do you produce win32 exes with deploytool in 64-Bit Matlab

MATLAB Compiler

MATLAB Version: 8.1.0.604 (R2013a)
I am using the Matlab compiler on a 64-bit and I need to be able to produce x32 compatible versions of the executables for people on older windows machines. How do I do this? I see several confusing suggestions about using -win32 flags, having to have both 64-bit and 32-bit versions of Matlab installed, etc. I assume there is an easier way of doing this?

Best Answer

From
doc mcc
-win32 Run in 32-Bit Mode
Use this option to build a 32-bit application on a 64-bit system only when the following are both true:
  • You use the same MATLAB installation root (matlabroot) for both 32-bit and 64-bit versions of MATLAB.
  • You are running from a Windows command line (not a MATLAB command line).
What do you think is confusing or can be easier?
In general you can install the environment where you want to have an executable for and create it there. That is safe, but yes this is not so easy.