Can .exe file compiled on 32bit computer with 64bit Matlab run on 64bit computer

If a 64bit Matlab was installed on the computer having a 32bit operation system. The Matlab GUI/script is deployed on that computer to create .exe file.
My question is:
Can this .exe file run on another computer having a 64bit operation system? So it can take the advantage of 'unlimited memory size' on 64bit computer.
Thanks

 Accepted Answer

You cannot install 64 bit MATLAB on a 32 bit operating system.
If you compile on a 32 bit MATLAB and install on a 64 bit operating system, that will work but only as a 32 bit executable; it will not act as a 64 bit program.

1 Comment

Also, you cannot run a 64 bit compiled executable on a 32 bit system. You can however run a 32 bit MATLAB on a 64 bit system and compile an app (which will of course be a 32 bit app) that will run on a 32 bit system. Basically if you're in the 32 bit world, everything has to be 32 bit. If you have a 64 bit computer with 64 bit MATLAB, you can run either 32 or 64 bit MATLAB, and compile code into stand alone executables for other 32 bit or 64 bit computers as long as you run the proper version of MATLAB when you compile the code, and deploy the matching MCR run time library.

Sign in to comment.

More Answers (1)

Thanks for your prompt replies.
Below is my understanding: If executable file is, 1-> Compiled on 64 bit computer with 64 bit Matlab. Executable file only works on 64 bit computer;
2-> Compiled on 32 bit or 64 bit computer with 32 bit Matlab. Executable file works on 32 bit and 64 bit computer, but only act as 32 executable.
Please correct me if I am wrong.
Cheers

1 Comment

That is correct, at least for MS Windows. You could potentially have difficulties if you compiled for 32 bit OS-X and tried to run on 64 bit OS-X.

Sign in to comment.

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!