MATLAB: Does the standalone version of a library created with graphics using the MCC command not produce a toolbar when plotted

figuremenubarfiguretoolbarMATLAB C/C++ Graphics Librarystand-alone

I am attempting to create a standalone application from MATLAB code which generates a plot. I am using the command below to create this application:
mcc -t -W libhg:Pkg -T link:exe -h mrank mrankp.c libmmfile.mlib
When I execute this application, I obtain a plot of my data points. However, this figure does not have any toolbars. Additionally, I receive the following warnings:
Warning: Unable to find FigureToolBar.fig on path - not adding built-in toolbar.
Warning: Unable to find FigureMenuBar.fig on path - not adding built-in menus.
Warning: Unable to find FigureToolBar.fig on path - not adding built-in toolbar.

Best Answer

This issue is eliminated when using the MATLAB Compiler Runtime (MCR) starting in MATLAB Compiler 4.0 (R14).
For older versions of MATLAB Compiler, use the following workaround:
When you compile a graphics application, it automatically creates a "bin" directory. The files listed below:
FigureToolBar.fig
FigureMenuBar.fig
which are located at
$MATLABROOT\toolbox\matlab\graphics
where $MATLABROOT is obtained by typing MATLABROOT at the MATLAB Command line.
should be automatically put into this "bin" directory. If this is not the case, copy the files into the "bin" directory and you should no longer receive these warnings.