Skip to content

Latest commit

 

History

History
45 lines (42 loc) · 1.96 KB

compiler-controlled-link-options.md

File metadata and controls

45 lines (42 loc) · 1.96 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Compiler-Controlled LINK Options | Microsoft Docs
11/04/2016
cpp-tools
article
link
C++
LINK tool [C++], compiler-controlled options
linker [C++], CL compiler control
linking [C++], affected by CL features
cl.exe compiler [C++], features that affect linking
cl.exe compiler [C++], controlling linker
e4c03896-c99c-4599-8502-e0f4bebe69d0
8
corob-msft
corob
ghogen

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
filename.def Passes /DEF:filename.def
/Fnumber Passes /STACK:number
/Fdfilename Passes /PDB:filename
/Fefilename Passes /OUT:filename
/Fmfilename Passes /MAP:filename
/Gy Creates packaged functions (COMDATs); enables function-level linking
/LD Passes /DLL
/LDd Passes /DLL
/link 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
/nologo Passes /NOLOGO
/Zd Passes /DEBUG
/Zi or /Z7 Passes /DEBUG
/Zl Omits default library name from .obj file

For more information, see Compiler Options.

See Also

Setting Linker Options
Linker Options