Products & Services Industries Academia Support User Community Company

Learn more about MATLAB Compiler   

Using Path Names

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

  1. Breaks the full name into the corresponding path name and file names (<path> and <file>).

  2. Replaces the full path name in the argument list with "-I <path> <file>". For example,

    mcc -m /home/user/myfile.m
    

    would be treated as

    mcc -m -I /home/user myfile.m
    

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

mcc -m -I /home/user/dir1 /home/user/dir2/myfile.m

would be equivalent to

mcc -m -I /home/user/dir1 -I /home/user/dir2 myfile.m

MATLAB 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 MATLAB Compiler parses. The -v option prints the full path name to the M-file during the dependency analysis phase.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS