フィルターのクリア

Compiled MATLAB GUIDE UI - Missing Functions

2 ビュー (過去 30 日間)
Scott
Scott 2012 年 2 月 1 日
Hi all,
I have developed an application in MATLAB consisting of a UI (developed using GUIDE) and some underlying functions invoked by callbacks from the main UI.
The export m-file generated by GUIDE for the UI is then compiled to generate an exe that clients can run using the MATLAB MCR.
I have a couple of questions relating to this process:
1. Is there still a requirement in MATLAB R2011b to use %#function definitions to identify all functions that your application is dependent upon for compilation purposes? I'm guessing there is, as I am getting a lot of 'missing function' error messages at runtime as a result of missing %#function statements.
2. Is there an easy way to determine all of the dependencies from a top-level GUIDE generated UI? I know of 'Tools-Show dependency report' but this does not work with m-files created using the GUIDE export function.
Thanks in advance for any response.
Cheers,
Scott

採用された回答

Walter Roberson
Walter Roberson 2012 年 2 月 1 日
The %#function pragma is needed in most GUIDE programs, because GUIDE codes its callbacks in terms of strings rather than in terms of function handles. The compiler is not able to find any dependency that appears only in a string.

その他の回答 (2 件)

Image Analyst
Image Analyst 2012 年 2 月 1 日
I've never done anything with "%#function" and my files compile just fine.
In addition to Dependency report, you can try fdep: http://www.mathworks.com/matlabcentral/fileexchange/17291 It seems to give a more complete report with tons of details (though you may not need all of them). There is also this one: http://www.mathworks.com/matlabcentral/fileexchange/14176-depfuntoolbox but I haven't tried it.

owr
owr 2012 年 2 月 1 日
Like Image Analyst said above, in general the dependency search during compilation should be able to locate dependent functions. The only situation Ive run into where this can be an issue is if the functions you are calling are methods of MATLAB classes. In that case the %#function comes into play. See for example this solution:
Are your missing functions class methods?

カテゴリ

Help Center および File ExchangeStandalone Applications についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by