MATLAB Answers

Petter
0

Deploy for windows 32-bit from a 64-bit computer

Asked by Petter
on 3 Apr 2011
Latest activity Commented on by Peter de Peinder on 17 Feb 2015
I am deploying a small application. I am creating the installation file from a Windows 64-but computer.
When the user tries to install the program on a 32-bit computer it gives an error messages about wrong processor type. How can I create a 32-bit installation package? I don't have access to a 32-bit computer.

  0 Comments

Sign in to comment.

4 Answers

Answer by Kaustubha Govind on 4 Apr 2011
 Accepted Answer

As of R2010b, it is possible to compile 32-bit Windows applications using MATLAB on a 64-bit machine. See the -win32 option on the mcc documentation page. Note that you also need to install 32-bit MATLAB.
Even if you are using an older version, you could try getting 32-bit version of MATLAB on your 64-bit machine and compile using that. Although this was not officially supported, several users have been able to have this working in the past.

  6 Comments

When I tried to install the 32-bit Matlab to the same folder of 64-bit Matlab, it gave me an error message that they can't be installed to the same folder.
OK. I found that for 2012b, I can just build the 32-bit exe from an installed 32-bit Matlab on a 64bit Windows machine. The 32bit exe seems to work fine on a 32-bit windows machine.

Sign in to comment.


Answer by jiro
on 3 Apr 2011

If you don't have access to a 32-bit computer, that's a problem. You need to run through the deployment process on the same platform as your end user's machine.

  2 Comments

Really? That is a strange limitation, since the compiler I am using is able to produce 32-bit code.
So, there's no way I can deploy my programs on a 32-bit computer?
Jiro's answer is the documented and supported one. I could make some half-hearted speculations about the technology, but I really don't know; I do know, that, that the documentation says specifically that cross-compiling is not supported.

Sign in to comment.


Answer by David
on 27 Mar 2014

Use the deploytool option -win32. Make sure to use the same MATLAB installation root (matlabroot) for both 32-bit and 64-bit versions of MATLAB and run from a Windows command line (not a MATLAB command line). See the documentation page for more.

  2 Comments

The documentation says "You use the same MATLAB installation root (matlabroot) for both 32-bit and 64-bit versions of MATLAB." How do I do this? When I install Matlab I didn't have any idea that this is a requirement of the mcc so guess what? I put them in different directories. Gee do I feel silly now.
It's a no brainer that people will want to compile for 32 bit environments yet their is no way of doing this in the deploy tool GUI that I can see. You have to resort to the usual DOS command line gobbledygook that programmers love and us engineers hate. I don't have the time for this. What's the real solution. Please spell it out! The mcc is not cheap. It should be better than this.
By the way I am compiling for 32 bit because the the DAQ toolbox has been dudded so the old code that was really good doesn't work in 64 bit. The 64 bit code which is really bad doesn't work at all for repetitive daq in and daq out configurations so I have to stay with 32 bit.
Not happy.
I fully agree with you Robert. Not happy for such a price....

Sign in to comment.


Answer by hans
on 4 Apr 2011

You can use "Windows Virtual PC". It generates a 32bit Windows XP environment and you can run any 32 bit applications in it. So if you also are have a 32 bit MATLAB version you can generate and try 32bit MATLAB programs on a 64bit Windows system.

  0 Comments

Sign in to comment.