用MATLAB生成.exe文件时出现额外的窗口问题 [英] Extra window problem when generating .exe file with MATLAB

查看:327
本文介绍了用MATLAB生成.exe文件时出现额外的窗口问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,我只是使用以下命令来开发我的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆