449Using Compiled Code
b. Search the Command Window output of the mcc command for a command
that starts with “mbuild –O -v … ”. It will include the name of the generated
main (top-level) C le, typically <programName>_main.c.
c. Open this le in a text editor (MATLAB’s Editor can be used for this).
d. Search for the WinMain()/main() function and at its very top (before the call to
mclInitializeApplication) add the following line:
1295
MessageBox(NULL, "Starting: click OK to continue", "title", MB_OK);
e. Save the le and recompile it using the mbuild –O -v … from step b.
f. Ensure that you always deploy the *.ctf le alongside the *.exe le.
g. When the application is run, a modal MessageBox will appear immediately
(before MCR initialization). ...