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?
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!
Actually, the command would be "mcc -m myfunction.m".
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?
Yes it is possible , you need to execute the mcc command under Linux on a computer which have the MATLAB Compiler installed.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

질문:

Ali
2012년 1월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by