24小时热门版块排行榜    

查看: 1739  |  回复: 8

szdchris

银虫 (小有名气)

[求助] Matlab中Gui编制的程序想脱离运行,但是CTF不见了。。。

mbuild –setup, 按提示选择matlab 自带编译器LCC。
然后用mcc编译.EXE
输入命令>>mcc,matlab会生成好多文件:mccExcludedFiles.log,
ReadMe.txt,gui.prj,gui_main.c,gui_mcc_component_data.c,
gui.exe。但是就是没有gui.ctf。是什么问题呢?高手指点啊
指令为:
??? Attempt to reference field of non-structure array.

Error in ==> try_first>pushbutton2_Callback at 117
data=getappdata(handles.figure1,'data');

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> try_first at 42
    gui_mainfcn(gui_State, varargin{:});

Error in ==> @(hObject,eventdata)try_first('pushbutton2_Callback',hObject,eventdata,guidata(hObject))


??? Error while evaluating uicontrol Callback

??? Attempt to reference field of non-structure array.

Error in ==> try_first>pushbutton1_Callback at 107
set(handles.edit1,'string',str);

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> try_first at 42
    gui_mainfcn(gui_State, varargin{:});

Error in ==> @(hObject,eventdata)try_first('pushbutton1_Callback',hObject,eventdata,guidata(hObject))


??? Error while evaluating uicontrol Callback

>> y=0==1
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lgycjpcqu

金虫 (正式写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
szdchris: 金币+20, 有帮助, 虽然还不行,但是很感谢 2013-04-03 14:14:30
csgt0: 金币+1, 欢迎交流 2013-05-31 11:27:28
配置编译器仅仅用mbuild –setup不够吧,还需要接着用mex –setup配置,我用的是Vc++2006没出现过楼主的问题啊
2楼2013-03-25 09:35:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

szdchris

银虫 (小有名气)

引用回帖:
2楼: Originally posted by lgycjpcqu at 2013-03-25 09:35:17
配置编译器仅仅用mbuild –setup不够吧,还需要接着用mex –setup配置,我用的是Vc++2006没出现过楼主的问题啊

mex -setup配置程序和前者一样吗?请简述一下,另外我mbuild -setup配置的是gui自己的编译器,即LCC,我选择vc++的时候出错呢
3楼2013-03-25 11:19:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

szdchris

银虫 (小有名气)

引用回帖:
2楼: Originally posted by lgycjpcqu at 2013-03-25 09:35:17
配置编译器仅仅用mbuild –setup不够吧,还需要接着用mex –setup配置,我用的是Vc++2006没出现过楼主的问题啊

Try to update options file: C:\Documents and Settings\Administrator\Application
Data\MathWorks\MATLAB\R14\compopts.bat
From template:              C:\MATLAB7\BIN\WIN32\mbuildopts\msvc60compp.bat

Done . . .


--> "C:\MATLAB7\bin\win32\mwregsvr C:\MATLAB7\bin\win32\mwcomutil.dll"

DllRegisterServer in C:\MATLAB7\bin\win32\mwcomutil.dll succeeded

--> "C:\MATLAB7\bin\win32\mwregsvr C:\MATLAB7\bin\win32\mwcommgr.dll"

DllRegisterServer in C:\MATLAB7\bin\win32\mwcommgr.dll succeeded
到这步时那个双引号是怎么输的,我的双引号输里边是红色的,该怎么办呢?
4楼2013-03-25 11:32:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lgycjpcqu

金虫 (正式写手)

【答案】应助回帖

引用回帖:
3楼: Originally posted by szdchris at 2013-03-25 11:19:24
mex -setup配置程序和前者一样吗?请简述一下,另外我mbuild -setup配置的是gui自己的编译器,即LCC,我选择vc++的时候出错呢...

mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n?

Select a compiler:
[1] Lcc-win32 C 2.4.1 in D:\APPLIE~1\MATLAB\sys\lcc
[2] Microsoft Visual C++ 6.0 in D:\APPLIED SOFTWARE\VC6.0\MSDev98

[0] None

Compiler:
和mbuild –setup基本是一致的,你配置好再试一下。
5楼2013-03-25 12:33:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lgycjpcqu

金虫 (正式写手)

【答案】应助回帖


dbb627: 金币+1, 感谢应助 2013-03-25 17:14:17
对了,顺便说一下我的版本是R2007b,选择VC的话你要确定电脑安装了VC哦
6楼2013-03-25 12:37:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

szdchris

银虫 (小有名气)

引用回帖:
6楼: Originally posted by lgycjpcqu at 2013-03-25 12:37:18
对了,顺便说一下我的版本是R2007b,选择VC的话你要确定电脑安装了VC哦

我用的是2008a,c++安装了,是6.0,现在比较纠结的是安装mbuild -setup的时候到这算完事了吗?
Warning: MBUILD requires that the Microsoft Visual C++ 6.0
directories "VC98" and "Common" be located within the same parent directory.
(Expected to find these directories in 'D:\Program Files'.)
Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2008a\compopts.bat
From template:              D:\matlab\bin\win32\mbuildopts\msvc60compp.bat

Done . . .
我见有的说明是到这步算完成了,但是,有的说明是还需要这一步——

Try to update options file: C:\Documents and Settings\Administrator\Application
Data\MathWorks\MATLAB\R14\compopts.bat
From template:              C:\MATLAB7\BIN\WIN32\mbuildopts\msvc60compp.bat

Done . . .


--> "C:\MATLAB7\bin\win32\mwregsvr C:\MATLAB7\bin\win32\mwcomutil.dll"

DllRegisterServer in C:\MATLAB7\bin\win32\mwcomutil.dll succeeded

--> "C:\MATLAB7\bin\win32\mwregsvr C:\MATLAB7\bin\win32\mwcommgr.dll"

DllRegisterServer in C:\MATLAB7\bin\win32\mwcommgr.dll succeeded
到底是怎么回事呢?如果按下面这步输的话,那怎么还有双引号呢,请指教!非常感谢
7楼2013-03-25 13:13:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lgycjpcqu

金虫 (正式写手)

【答案】应助回帖

引用回帖:
7楼: Originally posted by szdchris at 2013-03-25 13:13:12
我用的是2008a,c++安装了,是6.0,现在比较纠结的是安装mbuild -setup的时候到这算完事了吗?
Warning: MBUILD requires that the Microsoft Visual C++ 6.0
directories "VC98" and "Common&q ...

这个问题我的确不知道了,没遇到过,我配置的时候依次用mbuild -setup和mbuild –setup没出什么问题,对那些系统文件间的关联我也不是很清楚。
按照提示需要把"VC98" and "Common"和两个文件夹放到一起,我查了我的电脑,我安装时VC和MATLAB的安装文件夹是在一个目录下-APPLIED SOFTWARE文件夹下的,不知道是这个问题不?
至于你上面提到那个配置过程我是真的不懂了。
谈不上指教,我也在学MATLAB交流下罢了
我的安装路径给你做个参考
D:\APPLIED SOFTWARE\MATLAB
D:\APPLIED SOFTWARE\VC98
D:\APPLIED SOFTWARE\Visual.C++.6.EN
配置过程
>> mbuild -setup
Please choose your compiler for building standalone MATLAB applications:

Would you like mbuild to locate installed compilers [y]/n? y

Select a compiler:
[1] Lcc-win32 C 2.4.1 in D:\APPLIE~1\MATLAB\sys\lcc
[2] Microsoft Visual C++ 6.0 in D:\APPLIED SOFTWARE\VC6.0\MSDev98

[0] None

Compiler: 2

Please verify your choices:

Compiler: Microsoft Visual C++ 6.0
Location: D:\APPLIED SOFTWARE\VC6.0\MSDev98

Are these correct?([y]/n): y

Trying to update options file: C:\Documents and Settings\lgy\Application Data\MathWorks\MATLAB\R2007b\compopts.bat
From template:              D:\APPLIE~1\MATLAB\bin\win32\mbuildopts\msvc60compp.bat

Done . . .

>> mex -setup
Please choose your compiler for building external interface (MEX) files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:
[1] Lcc-win32 C 2.4.1 in D:\APPLIE~1\MATLAB\sys\lcc
[2] Microsoft Visual C++ 6.0 in D:\APPLIED SOFTWARE\VC6.0\MSDev98

[0] None

Compiler: 2

Please verify your choices:

Compiler: Microsoft Visual C++ 6.0
Location: D:\APPLIED SOFTWARE\VC6.0\MSDev98

Are these correct?([y]/n): y

Trying to update options file: C:\Documents and Settings\lgy\Application Data\MathWorks\MATLAB\R2007b\mexopts.bat
From template:              D:\APPLIE~1\MATLAB\bin\win32\mexopts\msvc60opts.bat

Done . . .
8楼2013-03-25 13:49:00
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

814647241

金虫 (小有名气)

追风者


csgt0: 金币+1, 欢迎交流 2013-05-31 11:28:14
楼主的问题我没有碰到过,我一般没用matlab自带的编译器,一般是用的VC++,编译过程没有出现问题。
加油
9楼2013-05-28 15:18:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 szdchris 的主题更新
信息提示
请填处理意见