필터 지우기
필터 지우기

I need to create a stand alone .exe file from a MATLAB code (with GUI) to work on all windows platforms (32 & 64 bits) while i have only 64 bit windows and 64 bit MATLAB software.

조회 수: 2 (최근 30일)
Dear MATHWORKS Technical Support,
I've created a code and I would like to share it with my friends as a software only (not as a code). I can't install MCR on every and each PC. I need it to be portable so I can run this .exe file on any platform. Also I've compiled my code on my MATLAB 64 bit so it didn't work on 32 bit machines, so I need a way to compile the same code using the same 64bit MATLAB software on my PC.
  댓글 수: 1
Titus Edelhofer
Titus Edelhofer 2015년 2월 3일
Note, that recent versions have incorporated the MCR download from MathWorks homepage in the package that you distribute. So when "installing" the package on your friends machine, it will look for the MCR and download and install it if not found.
Titus

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

답변 (2개)

Harsheel
Harsheel 2015년 1월 30일
  1. exe files created from 64-bit of MATLAB will run only on 64-bit Win.
  2. exe files created from 32-bit of MATLAB will run on 32-bit Win as well as 64-bit Win.
You need to install 32-bit version of MATLAB and recompile those files to create the 32-bit .exe file.
Note that if you don't use any MEX files (which are platform dependent) then, you can install the MATLAB Builder JA product to create .jar files. These files will be platform independent but of course your end users will have to write wrapper JAVA code to call the compiled .jar file. I'd go for the first workaround.
Disclaimer: I'm not from MathWorks Technical Support :)
  댓글 수: 5
Rik
Rik 2016년 3월 14일
Generating C code seems to be impossible when talking about GUIs made in Matlab. The only way out seems to be to build a GUI in another language and converting the rest of your code to C to compile it independently (which the GUI then calls externally).
Please, someone tell me I'm wrong, because that would save me the trouble of learning another language to a sufficient degree to build a GUI.
Walter Roberson
Walter Roberson 2016년 3월 14일
MATLAB Coder will not generally generate any graphics. MATLAB Coder is limited to a subset of the C Standard Library, and that does not include any graphics at all. If it were extended to the C++ Standard Library the situation would not change, as that does not include any graphics either.
It would hypothetically be possible for Mathworks to generate to one of the graphics standards, but which one? OpenGL ? DirectX ? Carbon?

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


Image Analyst
Image Analyst 2015년 1월 31일
Explain this requirement of yours in more detail: "I can't install MCR on every and each PC."
Bottom line: if you don't do that, then can't run on that computer, though they could use that computer as a "dumb terminal" to VNC into some other computer that you can install the MCR on.
  댓글 수: 1
Ahmed
Ahmed 2015년 2월 3일
I actually don't want to install anything because it requires administrative access. That's why I'm trying to have my code to be a standalone file (as a portable software)

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

카테고리

Help CenterFile 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