Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

mcc compiled executable didn't work!!

조회 수: 1 (최근 30일)
David
David 2014년 9월 3일
마감: MATLAB Answer Bot 2021년 8월 20일
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

답변 (1개)

Ben11
Ben11 2014년 9월 3일
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!')

Community Treasure Hunt

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

Start Hunting!

Translated by