MATLAB: Compiled MATLAB GUIDE UI – Missing Functions

compilerfunctionguidemcc

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

Best Answer

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.
Related Question