Why do I receive a depfun error when compiling a GUI with MATLAB Compiler 4.1 (R14SP1)?
1 次查看(过去 30 天)
显示 更早的评论
I have created a GUI in MATLAB that has callback functions defined in other files. For example, I could have a pushbutton whose 'Callback' property is set equal to:
myguicallback;
where MYGUICALLBACK is an M-function I have written. This GUI operates successfully in MATLAB, but when I try compiling it, I receive the following error:
??? Unable to locate myguicall; as a function on the MATLAB path
Warning: An object instance still exists.
Use the objectdirectory command to see a count of existing instances.
Depfun error: 'Unable to locate myguicall; as a function on the MATLAB path'
??? Error executing mcc, return status = 1.
采纳的回答
MathWorks Support Team
2009-6-27
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in MATLAB Compiler 4.1 (R14SP1) in the way that GUIs are compiled.
To work around this issue, remove the semi-colon from the end of all callback function declarations. For example, modify the 'Callback' property of a pushbutton from:
myguicallback;
to:
myguicallback
Additionally, the callback may be specified in a FIG-file. You may inspect the contents of a FIG-file using HGLOAD to open the file and FINDALL to inspect the children.
After you perform this modification for all callback function declarations, the depfun error should not be encountered.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!