Creating a standalone windows application file

Hi experts,
Anyone knows if there is an automated approach through Matlab command line to build a Windows Standalone Application (.exe file) from a Matalb script (.m file)?
Any help is apreciated! Ali

 Réponse acceptée

Walter Roberson
Walter Roberson le 26 Jan 2012

0 votes

You cannot build a standalone from a MATLAB script file. You need to use a function file instead.

7 commentaires

Ali
Ali le 26 Jan 2012
Thanks Walter for your answer. I know I can create a .exe file manually from a .m file.
What do you mean by function file?
The .m file must have "function" as the first word of its first non-blank non-comment line.
Once you have that, use mbuild
http://www.mathworks.com/help/toolbox/compiler/mbuild.html
Ali
Ali le 26 Jan 2012
Ok thanks alot for your answer!
Actually, the command would be "mcc -m myfunction.m".
Ah, I see now, mcc and deploytool are considered replacements for mbuild.
Ali
Ali le 27 Jan 2012
That's great! it's working perfect. Another thing, is there possibility to produce executable for Linux environments too instead of .exe? some sort of binary I mean?
Yes it is possible , you need to execute the mcc command under Linux on a computer which have the MATLAB Compiler installed.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by