用MATLAB生成.exe文件时出现额外的窗口问题 [英] Extra window problem when generating .exe file with MATLAB
问题描述
通常,我只是使用以下命令来开发我的MATLAB代码的可执行(.exe)文件:
usually i simply develop executable (.exe) files of my MATLAB codes by using this command:
mcc -m GUI.m
虽然.exe的创建没有问题,但是不幸的是,当我打开.exe时,还有一个黑色的窗口(如命令提示符)也被打开了,所以总共有两个窗口... GUI图形和提示符.我怎么没有这个提示?我可以在上述mcc命令中包含任何设置吗?
although there's no problem with the .exe creation, unfortunately when i opened the .exe, there's a black window (like command prompt) that is also opened, so two windows in total... the GUI figure and the prompt. how do i not have this prompt? is there any setting i can include in the mcc command as above?
谢谢.
推荐答案
在mcc命令行中使用-e
代替-m
.这将改变其编译方式(使其成为GUI应用程序而不是控制台应用程序),并隐藏命令窗口.需要Visual Studio.有关详细信息,请参见doc mcc
.
Use -e
instead of -m
in the mcc command line. This will change how it's compiled (making it a GUI app instead of a console app), and suppress the command window. Requires Visual Studio. See doc mcc
for details.
这篇关于用MATLAB生成.exe文件时出现额外的窗口问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!