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.

4 Ansichten (letzte 30 Tage)
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 Kommentar
Titus Edelhofer
Titus Edelhofer am 3 Feb. 2015
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

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Harsheel
Harsheel am 30 Jan. 2015
  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 Kommentare
Rik
Rik am 14 Mär. 2016
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 am 14 Mär. 2016
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?

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 31 Jan. 2015
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 Kommentar
Ahmed
Ahmed am 3 Feb. 2015
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)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by