NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

/Tc, /Tp, /TC, /TP (Specify Source File Type)

/Tcfilename
/Tpfilename
/TC
/TP

The /Tc option specifies that filename is a C source file, even if it doesn’t have a .c extension. The /Tp option specifies that filename is a C++ source file, even if it doesn’t have a .cpp or .cxx extension. A space between the option and filename is optional. Each option specifies one file; to specify additional files, repeat the option.

/TC and /TP are "global" variants of /Tc and /Tp. They specify to the compiler to treat all files named on the command line as C source files (/TC) or C++ source files (/TP), without regard to location on the command line in relation to the option. These global options can be overridden on a single file via /Tc or /Tp.

By default, CL assumes that files with the .c extension are C source files and files with the .cpp or the .cxx extension are C++ source files.

Examples

The following CL command line specifies that MAIN.c, TEST.prg, and COLLATE.prg are all C source files. CL will not recognize PRINT.prg.

CL MAIN.C /TcTEST.PRG /TcCOLLATE.PRG PRINT.PRG

The following CL command line specifies that FOO1.c, FOO2.cxx, FOO3.huh, and FOO4.o are compiled as C++ files, and FOO5.z is compiled as a C file.

CL FOO1.C FOO2.CXX FOO3.HUH FOO4.O /Tc FOO5.Z /TP

See Also

Compiler Options | Setting Compiler Options