MATLAB Answers

mcc compiled executable didn't work!!

조회 수: 2(최근 30일)
David
David 3 Sep 2014
답변: Ben11 3 Sep 2014
I tried to compile the following simple file(hello.m) as below,
mcc -mv hello.m
=====================
function hello
disp('Hello World!')
=====================
However, the compiled hello.exe didn't work at all:
When I tried to run it in the dos console, it just hung there and got no results

  댓글 수: 0

로그인 to comment.

답변(1개)

Ben11
Ben11 3 Sep 2014
I think that's because, as trivial as it may sound, the disp command is used to display stuff in the Command Window, which is not available with compiled executable since it's the point to not have a command window.
What if you try using a msgbox for instance?
msgbox('Hello World!')

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by