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

 Respuesta aceptada

Walter Roberson
Walter Roberson el 26 de En. de 2012

0 votos

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

7 comentarios

Ali
Ali el 26 de En. de 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?
Walter Roberson
Walter Roberson el 26 de En. de 2012
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 el 26 de En. de 2012
Ok thanks alot for your answer!
Kaustubha Govind
Kaustubha Govind el 26 de En. de 2012
Actually, the command would be "mcc -m myfunction.m".
Walter Roberson
Walter Roberson el 26 de En. de 2012
Ah, I see now, mcc and deploytool are considered replacements for mbuild.
Ali
Ali el 27 de En. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.

Preguntada:

Ali
el 26 de En. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by