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

 採用された回答

Walter Roberson
Walter Roberson 2012 年 1 月 26 日

0 投票

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

7 件のコメント

Ali
Ali 2012 年 1 月 26 日
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 2012 年 1 月 26 日
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 2012 年 1 月 26 日
Ok thanks alot for your answer!
Kaustubha Govind
Kaustubha Govind 2012 年 1 月 26 日
Actually, the command would be "mcc -m myfunction.m".
Walter Roberson
Walter Roberson 2012 年 1 月 26 日
Ah, I see now, mcc and deploytool are considered replacements for mbuild.
Ali
Ali 2012 年 1 月 27 日
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?
Aurelien Queffurust
Aurelien Queffurust 2012 年 1 月 27 日
Yes it is possible , you need to execute the mcc command under Linux on a computer which have the MATLAB Compiler installed.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeC Shared Library Integration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by