/Tc, /Tp, Ta (Specify C, C++ Source File, or Assembly Language)

Options

/Tcfilename

/Tpfilename

/Tafilename

The /Tc option specifies that filename is a C source file, even if it doesn't have the extension .C. The /Tp option specifies that filename is a C++ source file, even if it doesn't have the extension .CPP or .CXX. The /Ta option specifies that filename is an assembly language file, even if it doesn't have the extension .ASM. You must have installed the Microsoft Macro Assembler in order to use the /Ta option. This option causes CL to invoke the Macro Assembler to assemble the file. For all three options, the space between the option and the filename argument is optional.

If this option does not appear, CL assumes that files with the .C extension are C source files, files with the .CPP or the .CXX extension are C++ source files, and files with the .ASM extension are assembly language files.

If you need to specify more than one source file with an extension other than the default (.C, .CPP, .ASM) you must specify each file with the appropriate command line option (/Tc, /Tp /Ta).

Example

In the following example, the CL command compiles the three source files MAIN.C, TEST.PRG, and COLLATE.PRG.

CL MAIN.C /Tc TEST.PRG /Tc COLLATE.PRG PRINT.PRG

Because the file PRINT.PRG is given without a /Tc option, CL treats it as an object file. Therefore, after compiling the three source files, CL links the object files MAIN.OBJ, TEST.OBJ, COLLATE.OBJ, and PRINT.PRG.