24小时热门版块排行榜    

查看: 1803  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 085600材料与化工 求调剂 +12 enenenhui 2026-03-13 13/650 2026-03-16 08:30 by Linda Hu
[考研] 080500,材料学硕302分求调剂学校 +4 初识可乐 2026-03-14 5/250 2026-03-14 21:08 by peike
[考研] 308 085701 四六级已过求调剂 +7 温乔乔乔乔 2026-03-12 14/700 2026-03-14 10:49 by JourneyLucky
[考研] 学硕285求调剂 +13 Wisjxn 2026-03-12 46/2300 2026-03-14 10:33 by JourneyLucky
[考研] 330求调剂 +3 ?酱给调剂跪了 2026-03-13 3/150 2026-03-14 10:13 by JourneyLucky
[考研] 一志愿浙江大学0856材料与化工求调剂 +4 yansheng@211 2026-03-09 5/250 2026-03-14 02:10 by JourneyLucky
[考研] 求调剂! +4 朔朔话 2026-03-09 4/200 2026-03-14 01:38 by JourneyLucky
[考研] 求调剂 +6 yfihxh 2026-03-09 6/300 2026-03-14 01:18 by JourneyLucky
[基金申请] 有必要更换申报口吗 20+3 fannyamoy 2026-03-11 3/150 2026-03-14 00:52 by zhanghaozhu
[考研] 调剂 +3 13853210211 2026-03-10 3/150 2026-03-14 00:47 by JourneyLucky
[考研] 材料与化工(0856)304求B区调剂 +6 邱gl 2026-03-12 7/350 2026-03-13 23:24 by 邱gl
[考研] 085600调剂 +5 漾漾123sun 2026-03-12 5/250 2026-03-13 22:06 by 星空星月
[考研] 材料与化工085600调剂求老师收留 +9 jiaanl 2026-03-11 9/450 2026-03-13 20:22 by JourneyLucky
[考研] 一志愿山大07化学 332分 四六级已过 本科山东双非 求调剂! +3 不想理你 2026-03-12 3/150 2026-03-13 14:18 by JourneyLucky
[考研] 070303一志愿西北大学学硕310找调剂 +3 d如愿上岸 2026-03-12 5/250 2026-03-13 10:56 by houyaoxu
[考研] 070303一志愿西北大学学硕310找调剂 +3 d如愿上岸 2026-03-13 3/150 2026-03-13 10:43 by houyaoxu
[考博] 26读博 +4 Rui135246 2026-03-12 10/500 2026-03-13 07:15 by gaobiao
[考研] 研究生招生 +3 徐海涛11 2026-03-10 7/350 2026-03-12 14:26 by 徐海涛11
[考研] 大连大学化学专业研究生调剂 +3 琪久. 2026-03-10 8/400 2026-03-11 10:02 by 琪久.
[考研] 294 英二数二物化 求调剂 +6 米饭团不好吃 2026-03-09 6/300 2026-03-09 23:55 by barlinike
信息提示
请填处理意见