| MATLAB® Compiler™ | ![]() |
If you specify a full path name to an M-file on the mcc command line, MATLAB Compiler
Breaks the full name into the corresponding path name and file names (<path> and <file>).
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.
Note MATLAB Compiler produces a warning (specified_file_mismatch) if a file with a full path name is included on the command line and MATLAB Compiler finds it somewhere else. |
![]() | Using Macros to Simplify Compilation | Using Bundle Files | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |