MATLAB: Do I receive an error when compiling a standalone application or shared library using MATLAB Compiler when taking toolboxes off the path

MATLAB Compiler

I am using MATLAB Compiler to generate standalone application and or shared libraries. Since it is faster to compile, I take the toolboxes I am not using in my code off the compile path by using the -N flag at the command line or the "Toolboxes On Path" feature in DEPLOYTOOL.
At compile time, I receive the following error:
Depfun error: 'Invalid directory: <compiling directory>\images'
??? Error using ==> mcc
Error executing mcc, return status = 1.

Best Answer

The behavior occurs when your code uses toolboxes which depend on other toolboxes to run. For example, the Bioinformatics Toolbox uses the Statistics Toolbox and cannot be removed from the compile path.