MATLAB Compiler Previous page   Next Page

Using Pathnames

If you specify a full pathname to an M-file on the mcc command line, the MATLAB Compiler

  1. Breaks the full name into the corresponding pathname and filenames (<path> and <file>).
  2. Replaces the full pathname in the argument list with "-I <path> <file>". For example,
  1. would be treated as

In rare situations, this behavior can lead to a potential source of confusion. For example, suppose you have two different M-files that are both named myfile.m and they reside in /home/user/dir1 and /home/user/dir2. The command

  1. would be equivalent to

The Compiler finds the myfile.m in dir1 and compiles it instead of the one in dir2 because of the behavior of the -I option. If you are concerned that this might be happening, you can specify the -v option and then see which M-file the Compiler parses. The -v option prints the full pathname to the M-file during the dependency analysis phase.


Previous page  Understanding a Macro Option Using Bundle Files Next page

© 1994-2005 The MathWorks, Inc.