MATLAB: Do I get an error message about “missing CTF file” when starting standalone applications from a directory containing an EXE file and not the CTF file, even though the CTF file is in the system path

documentationMATLAB Compiler

In the Compiler Documentation you can find the following:
"The working directory must be the same as the for the
CTF file to be found or else the directory containing your CTF file must be
on your system path. Therefore, you must start your application from its directory
or else modify your system path. …Make sure the directory
containing 'myProgram.ctf' is in your dynamic load library path
(PATH on Windows, or LD_LIBRARY_PATH on Linux, for example), or
your application search path (PATH on both Windows and Linux).
Error initializing CTF Archive."
The following error message is displayed when the CTF file is in a different directory, included in the system PATH variable:
The CTF archive does not exist!
When the CTF file is in the same directory as the EXE-file, it works. It also works with different directories in MATLAB R14SP3.

Best Answer

This bug has been fixed in Release 2007b (R2007b). For previous product releases, read below for any possible workarounds:
This is an error within the documentation for MATLAB Compiler 4.6 (R2007a) within the Suggested Location of CTF-file section. The documentation should read as follows:
The .CTF file must reside in the same directory as the executable or shared
library.