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

 채택된 답변

Walter Roberson
Walter Roberson 2013년 3월 1일
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

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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

yu chen
yu chen 2013년 3월 1일
편집: yu chen 2013년 3월 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

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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by