yu1983619 发表于 2006-6-27 21:23

将用GUI作的图形用户界面得到的程序转换成EXE文件的问题

我按照精通matlab6.5编制的一段GUI程序,但再用mcc -B sgl对其进行编译时,系统提示出错信息如下:请高手指点。<BR>Warning: File: mygui Line: 137 Column: 5<BR>References to "handle" will produce a run-time error because it is an undefined function or variable.<BR>Warning: File: mygui Line: 147 Column: 5<BR>References to "handle" will produce a run-time error because it is an undefined function or variable.<BR>Warning: File: step Line: 108 Column: 10<BR>The MATLAB Compiler does not currently support MATLAB object-oriented programming.References to the method "ss" will produce a run-time error.<BR>Warning: File: step Line: 91 Column: 10<BR>The MATLAB Compiler does not currently support MATLAB object-oriented programming.References to the method "tf" will produce a run-time error.

realyyy 发表于 2006-6-28 08:32

最好把程序给大家看看

realyyy 发表于 2006-6-29 19:25

<P>我机器上装的是MATLAB7.0,按照<a href="http://202.118.250.107/vibbbs/dispbbs.asp?boardid=35&amp;replyid=13888&amp;id=13888&amp;page=1&amp;skin=0&amp;Star=4" target="_blank" >http://202.118.250.107/vibbbs/dispbbs.asp?boardid=35&amp;replyid=13888&amp;id=13888&amp;page=1&amp;skin=0&amp;Star=4</A>中我写的过程,你的程序可以生成EXE程序并独立运行,在我的机器上已调试通过,并没有出现你说的错误提示。(对了,我用的命令是mcc -m mygui)<BR>要不你装成7.0试试吧。</P>

yu1983619 发表于 2006-6-29 19:40

回复:(realyyy)我机器上装的是MATLAB7.0,按照http...

<DIV class=quote><B>以下是引用<I>realyyy</I>在2006-6-29 19:25:36的发言:</B><BR>
<P>我机器上装的是MATLAB7.0,按照<a href="http://202.118.250.107/vibbbs/dispbbs.asp?boardid=35&amp;replyid=13888&amp;id=13888&amp;page=1&amp;skin=0&amp;Star=4" target="_blank" >http://202.118.250.107/vibbbs/dispbbs.asp?boardid=35&amp;replyid=13888&amp;id=13888&amp;page=1&amp;skin=0&amp;Star=4</A>中我写的过程,你的程序可以生成EXE程序并独立运行,在我的机器上已调试通过,并没有出现你说的错误提示。(对了,我用的命令是mcc -m mygui)<BR>要不你装成7.0试试吧。</P></DIV>
<P>据我所知mcc -m mygui.m命令只能编译不曾调用绘图指令的文件<BR>但我的程序中调用了绘图指令,当我用该命令是系统提示<BR>References to "findobj" require the C/C++<STRONG> Graphics Library</STRONG> when executing in stand-alone mode. You must specify -B sgl or -B sglcpp in order to use the C/C++ Graphics Library. Also, if using the -W option, you must specify either the mainhg or libhg wrapper type. A run-time error will occur if the C/C++ Graphics Library is not present when "findobj" is called. <BR>难道7.0版的matlab 不区分mcc -m mygui.m与mcc -B sgl mygui.m么?<BR></P>

realyyy 发表于 2006-6-29 19:44

<P>很有可能。因为我用mcc -m mygui调试通过了啊!</P>

tz6091 发表于 2006-6-30 11:50

<FONT color=#ff0000>(注:7.0版直接安装C:\MATLAB7\toolbox\compiler\deploy\win32\MCRInstaller.exe即可。)<BR></FONT><FONT color=#000000>是在其他机子上安装<FONT color=#ff0000>MCRInstaller.exe</FONT>是吧?<BR></FONT>

realyyy 发表于 2006-6-30 19:38

<P>是</P>

yu1983619 发表于 2006-7-4 16:20

关于matlab7.0编译环境的设置

原帖由 realyyy 于 2006-6-29 19:44 发表
<P>很有可能。因为我用mcc -m mygui调试通过了啊!</P>
我想问一下
在matlab7.0中设置mcc编译环境的命令和在6.5里是一样的么
另外,有人称7.0没有6.5功能完善
是这样么?
页: [1]
查看完整版本: 将用GUI作的图形用户界面得到的程序转换成EXE文件的问题