フィルターのクリア

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