MATLAB: Does the MATLAB Compiler 4.0 (R14) not find files that are in directories I have added to the PATH since starting MATLAB

aaddpathiMATLAB Compilermccsavepath

After I started MATLAB, I used ADDPATH to add directories to my PATH. The functions in these directories are required by the function I am trying to compile. However, when I compile my function using MCC it fails to find the functions in the directories I have added.

Best Answer

This bug has been fixed for MATLAB 7.0.1 (R14SP1). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in The MATLAB Compiler 4.0 (R14).
As a workaround, use the -I flag with MCC as in:
mcc -m $TESTFUNCTION -I $PATH-TO-MY-FILES
where $TESTFUNCTION is the function to be compiled and $PATH-TO-MY-FILES is the path you were attempting to add with ADDPATH.
Alternatively, you may use the -a flag with MCC to explicitly add individual files to your application.