-O mcompile option

The -O option that can be used with the mcompile utility command.

The output (-O) option of the mcompile utility command is used to specify, through a parameter, the location or file name, or both, for the resulting compiled map file. There are 2 different cases where the output (-O) option can be used in the mcompile command.

In the first case, the output (-O) option is used with the compile all maps (-A) option. The specified parameter could be either the name of the directory where the resulting compiled map files are written or the full file path specification in which a wildcard can be used to represent the compiled map file naming convention. The default naming convention for the compiled map file is executable_map_name.mmc. If a wildcard is specified in the full path as mcompile mymaps.mms -A -O C:\MyDev\Compiledmaps\2002-02-28_*.win, the compiled maps are produced in the C:\MyDev\Compiledmaps directory with the 2002-02-28_<executable_map_name>.win naming convention.

In the second case, the output (-O) option is used without the compile all maps (-A) option. The specified parameter could be the name of the directory where the resulting compiled map files are written, the full file path specification in which a wildcard can be used to represent the compiled map file, or the full path in which the complete filename can be specified. The default naming convention for the compiled map file is executable_map_name.mmc. If a wildcard is specified in the full path as mcompile mymaps.mms MyExecMap -O C:\MyDev\Compiledmaps\*.win, the compiled maps are produced in the C:\MyDev\Compiledmaps directory with the <executable_map_name>.win naming convention. If the complete file name is specified, for example, mcompile mymaps.mms MyExecMap -O C:\MyDev\Compiledmaps\MyExecForwin.win, the MyExecForWin.win file is produced in the C:\MyDev\Compiledmaps directory.

If the (-O) option is not specified, the compile map is written to the same directory as of the map source file using the default naming convention executable_map_name.mmc. If the (-O) option is specified and the parameter is not provided, the command line is invalid, and the Not a valid command line - The file name for the resulting compiled map file should be provided when -O option is selected. error message displays on the console. If the file name or the path provided for the (-O) option is not valid or returns error while attempting to open or write to the file, the Compilation error - The file/path provided for the option (-O) is not valid, unable to write to the specified directory/file message is written to the mcompile log file if it is enabled.