MATLAB: Does the project which contains a long pathname fail to compile when using the MATLAB Compiler 4.0 (R14) under Windows

MATLAB Compiler

I have a compiled MATLAB application (or other compiled component) that I am atttempting to use. I receive an error similar to the following:
Extracting CTF archive. This may take a few seconds, depending on the
size of your application. Please wait...
Error initializing CTF Archive
Failed to remove
'C:\Documents and Settings\testtest\My Documents\hellowor\ZIP
3\Projects 2\Projects 75456\test files here\Matlab\Compiler Test\Copy
of magic\magicsquare_mcr/Documents and Settings/htesttestr/My
Documents/testtest/Shared/ZIP 4/Matlab/Startup
Files/test_function_is here_only333.m'.
Verify file ownership and access permissions.
Error opening 'C:\Documents and Settings\testtest\My Documents\hellowor\ZIP
3\Projects 2\Projects 75456\test files here\Matlab\Compiler Test\Copy
of magic\magicsquare_mcr/Documents and Settings/htesttestr/My
Documents/testtest/Shared/ZIP 4/Matlab/Startup
Files/test_function_is here_only333.m'

Best Answer

This error occurs because Windows imposes a limit on the character length of a directory path.
To workaround this place the project files in a directory with a shorter pathname. To ensure that no errors occur use a directory with a short enough path such that there is enough character leeway for the multiple subdirectories created by extraction of the CTF archive.