This enhancement has been incorporated in Release 2010b (R2010b). For previous product releases, read below for any possible workarounds:
As of R2010b, it is now a supported workflow to create a 32-bit application using a 32-bit installation of MATLAB and the MATLAB Compiler on a 64-bit system. Please see the documentation page of MCC and DEPLOYTOOL for more details.
For previous releases, it is not possible to compile a 32-bit application on a 64-bit machine using MATLAB Compiler. The underlying architecture is checked during the build process by the MBUILD command and an error should be thrown if the development (underlying) and the target architectures are different. This is true even if 32-bit version of the MATLAB Compiler is used on the 64-bit machine.
There are no workarounds.