This documentation is archived and is not being maintained.

Compiler-Controlled LINK Options

The CL compiler automatically calls LINK unless you specify the /c option. CL provides some control over the linker through command-line options and arguments. The following table summarizes the features in CL that affect linking.

CL specification

CL action that affects LINK

Any file name extension other than .c, .cxx, .cpp, or .def

Passes a file name as input to LINK


Passes /DEF:filename.def


Passes /STACK:number


Passes /PDB:filename


Passes /OUT:filename


Passes /MAP:filename


Creates packaged functions (COMDATs); enables function-level linking


Passes /DLL


Passes /DLL


Passes remainder of command line to LINK

/MD or /MT

Places a default library name in the .obj file

/MDd or /MTd

Places a default library name in the .obj file. Defines the symbol _DEBUG


Passes /NOLOGO


Passes /DEBUG

/Zi or /Z7

Passes /DEBUG


Omits default library name from .obj file

For more information, see Compiler Options.