-merge_files


< Compile Options / Optimize Options >

[Format]

-merge_files

[Description]

-

This option allows the compiler to compile multiple C source files and output the results to a single object file.

-

The name of the object file is specified by the output option. If no name is specified, the filename will be that of the first source file plus a filename extension that corresponds to the selected output format.

-

If src or obj is selected as the output format, the compiler also generates blank files that have the names of the other source files with the given filename extension attached.

[Example]

ccrx -merge_files -output=obj=files.obj file1.c file2.c file3.c

files.obj is the object file. Blank files file1.obj, file2.obj, and file3.obj are also generated.

[Remarks]

-

This option is invalid when only one source file is to be compiled or when the output option has been used to specify prep as the output format.

-

Inter-file in-line expansion is applied when this option is used with the inline option.

-

This option is not available for files to be compiled in C++ or EC++.

-

The following restrictions apply to programs that include static functions or static variables.

-

If you wish to use the [Watch] window of the debugger to view a static variable that has the same name as a variable in another file, specify the variable name as well as the filename. The debugger cannot identify the variable without a filename.

-

When two or more files contain static variables with the same name and rlink is used to overlay sections to which the files belong, the debugger's facility to display overlay sections taking precedence over other sections is not available.

-

The names of static variables and static functions written in the link map file (.map) are those converted by the compiler (i.e., not original ones).

-

Any differences (e.g. type specifier) in declarations of the same variable may lead to an error in compilation.