Skip to content

Commit 7655bf9

Browse files
authored
Merge pull request #4151 from MicrosoftDocs/main637982552591326501sync_temp
Repo sync for protected CLA branch
2 parents 47423e1 + 58eb165 commit 7655bf9

File tree

6 files changed

+129
-73
lines changed

6 files changed

+129
-73
lines changed
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
---
2-
description: "Learn more about: .Ilk Files as Linker Input"
3-
title: ".Ilk Files as Linker Input"
4-
ms.date: "11/04/2016"
5-
helpviewer_keywords: ["ILK files", ".ilk files"]
2+
description: "Learn more about: .ilk files as linker input"
3+
title: ".ilk files as linker input"
4+
ms.date: 09/07/2022
5+
helpviewer_keywords: [".ilk files", ".ilk files"]
66
ms.assetid: 7324c104-9e5d-423d-b268-b59f92607bf2
77
---
8-
# .Ilk Files as Linker Input
8+
# `.ilk` files as linker input
99

10-
When linking incrementally, LINK updates the .ilk status file that it created during the first incremental link. This file has the same base name as the .exe file or the .dll file, and it has the extension .ilk. During subsequent incremental links, LINK updates the .ilk file. If the .ilk file is missing, LINK performs a full link and creates a new .ilk file. If the .ilk file is unusable, LINK performs a nonincremental link. For details about incremental linking, see the [Link Incrementally (/INCREMENTAL)](incremental-link-incrementally.md) option.
10+
The linker creates and uses a *`.ilk`* database file for incremental link information.
11+
12+
## Remarks
13+
14+
When linking incrementally, LINK updates the *`.ilk`* status file that it created during the first incremental link. This file has the same base name as the target EXE or DLL file, and it has the extension *`.ilk`*. During subsequent incremental links, LINK updates the *`.ilk`* file. If the *`.ilk`* file is missing, LINK performs a full link and creates a new *`.ilk`* file. If the *`.ilk`* file is unusable, LINK performs a non-incremental link. For more information about incremental linking, see the [`/INCREMENTAL` (Link incrementally)](incremental-link-incrementally.md) linker option. For information about how to specify the name and location of the file, see [`/ILK` (Name incremental database file)](./ilk-name-incremental-database-file.md).
1115

1216
## See also
1317

14-
[LINK Input Files](link-input-files.md)<br/>
15-
[MSVC Linker Options](linker-options.md)
18+
[LINK input files](link-input-files.md)\
19+
[MSVC linker options](linker-options.md)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: "/ILK (Name incremental database file)"
3+
description: "The MSVC linker option /ILK specifies the incremental link database file pathname."
4+
ms.date: 09/07/2022
5+
f1_keywords: ["VC.Project.VCLinkerTool.IncrementalLinkDatabaseFile", "/ilk", "ilk"]
6+
helpviewer_keywords: ["Name incremental database file in C++ linker", "/ILK linker option", "-ILK linker option", "ILK linker option"]
7+
---
8+
# `/ILK` (Name incremental database file)
9+
10+
The **`/ILK`** linker option tells the linker where to put the *`.ilk`* database file for incremental link information ([`/INCREMENTAL`](./incremental-link-incrementally.md)).
11+
12+
## Syntax
13+
14+
> **`/ILK:`**\[*`pathname`*]
15+
16+
### Arguments
17+
18+
*`pathname`*\
19+
The destination directory and filename for the generated *`.ilk`* file. If the **`/ILK`** option isn't specified when **`/INCREMENTAL`** is used, the filename is created by appending *`.ilk`* to the target base filename.
20+
21+
## Remarks
22+
23+
The **`/ILK`** linker option tells the linker the path and filename to use for the *`.ilk`* incremental database file when you specify [`/INCREMENTAL`](./incremental-link-incrementally.md).
24+
25+
### To set this compiler option in the Visual Studio development environment
26+
27+
1. Open the project **Property Pages** dialog box. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
28+
29+
1. Select the **Configuration Properties** > **Linker** > **General** property page.
30+
31+
1. Modify the **Incremental Link Database File** property. The default value is `$(IntDir)$(TargetName).ilk`.
32+
33+
### To set this compiler option programmatically
34+
35+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalOptions%2A>.
36+
37+
## See also
38+
39+
[`/INCREMENTAL`](./incremental-link-incrementally.md)\
40+
[MSVC linker reference](linking.md)\
41+
[MSVC linker options](linker-options.md)
Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
---
2-
description: "Learn more about: /INCREMENTAL (Link Incrementally)"
3-
title: "/INCREMENTAL (Link Incrementally)"
4-
ms.date: "11/04/2016"
2+
description: "Learn more about: /INCREMENTAL (Link incrementally)"
3+
title: "/INCREMENTAL (Link incrementally)"
4+
ms.date: 09/07/2022
55
f1_keywords: ["/incremental", "VC.Project.VCLinkerTool.LinkIncremental"]
66
helpviewer_keywords: ["/INCREMENTAL linker option", "-INCREMENTAL linker option", "INCREMENTAL linker option", "link incrementally option", "LINK tool [C++], options for full linking", "incremental linking"]
77
ms.assetid: 135656ff-94fa-4ad4-a613-22e1a2a5d16b
88
---
9-
# /INCREMENTAL (Link Incrementally)
9+
# `/INCREMENTAL` (Link incrementally)
1010

11-
```
12-
/INCREMENTAL[:NO]
13-
```
11+
Specifies whether to link incrementally or always perform a full link.
12+
13+
## Syntax
14+
15+
> **`/INCREMENTAL`**\[**`:NO`**]
1416
1517
## Remarks
1618

17-
Controls how the linker handles incremental linking.
19+
The **`/INCREMENTAL`** linker option controls how the linker handles incremental linking.
1820

19-
By default, the linker runs in incremental mode. To override a default incremental link, specify /INCREMENTAL:NO.
21+
By default, the linker runs in incremental mode. To override a default incremental link, specify **`/INCREMENTAL:NO`**.
2022

21-
An incrementally linked program is functionally equivalent to a program that is non-incrementally linked. However, because it is prepared for subsequent incremental links, an incrementally linked executable, static library, or dynamic-link library file:
23+
An incrementally linked program is functionally equivalent to a program that is non-incrementally linked. However, because it's prepared for subsequent incremental links, an incrementally linked executable, static library, or dynamic-link library file:
2224

2325
- Is larger than a non-incrementally linked program because of padding of code and data. Padding enables the linker to increase the size of functions and data without recreating the file.
2426

@@ -27,35 +29,37 @@ An incrementally linked program is functionally equivalent to a program that is
2729
> [!NOTE]
2830
> To ensure that your final release build does not contain padding or thunks, link your program non-incrementally.
2931
30-
To link incrementally regardless of the default, specify /INCREMENTAL. When this option is selected, the linker issues a warning if it cannot link incrementally, and then links the program non-incrementally. Certain options and situations override /INCREMENTAL.
32+
To link incrementally regardless of the default, specify **`/INCREMENTAL`**. When this option is selected, the linker issues a warning if it can't link incrementally, and then links the program non-incrementally. Certain options and situations override **`/INCREMENTAL`**.
3133

3234
Most programs can be linked incrementally. However, some changes are too great, and some options are incompatible with incremental linking. LINK performs a full link if any of the following options are specified:
3335

34-
- Link Incrementally is not selected (/INCREMENTAL:NO)
36+
- Link Incrementally isn't selected (**`/INCREMENTAL:NO`**)
3537

36-
- /OPT:REF is selected
38+
- **`/OPT:REF`** is selected
3739

38-
- /OPT:ICF is selected
40+
- **`/OPT:ICF`** is selected
3941

40-
- /OPT:LBR is selected
42+
- **`/OPT:LBR`** is selected
4143

42-
- /ORDER is selected
44+
- **`/ORDER`** is selected
4345

44-
/INCREMENTAL is implied when [/DEBUG](debug-generate-debug-info.md) is specified.
46+
**`/INCREMENTAL`** is implied when [`/DEBUG`](debug-generate-debug-info.md) is specified.
4547

4648
Additionally, LINK performs a full link if any of the following situations occur:
4749

48-
- The incremental status (.ilk) file is missing. (LINK creates a new .ilk file in preparation for subsequent incremental linking.)
50+
- The incremental status (*`.ilk`*) file is missing. (LINK creates a new *`.ilk`* file in preparation for subsequent incremental linking.)
4951

50-
- There is no write permission for the .ilk file. (LINK ignores the .ilk file and links non-incrementally.)
52+
- There's no write permission for the *`.ilk`* file. (LINK ignores the *`.ilk`* file and links non-incrementally.)
5153

52-
- The .exe or .dll output file is missing.
54+
- The *`.exe`* or *`.dll`* output file is missing.
5355

54-
- The timestamp of the .ilk, .exe, or .dll is changed.
56+
- The timestamp of the *`.ilk`*, *`.exe`*, or *`.dll`* is changed.
5557

5658
- A LINK option is changed. Most LINK options, when changed between builds, cause a full link.
5759

58-
- An object (.obj) file is added or omitted.
60+
- An object (*`.obj`*) file is added or omitted.
61+
62+
An incremental link creates or updates an incremental link database *`.ilk`* file. You can specify the name and location of this file by using the [`/ILK` (Name incremental database file)](./ilk-name-incremental-database-file.md) linker option. For more information about the *`.ilk`* file, see [`.ilk` files as linker input](./dot-ilk-files-as-linker-input.md).
5963

6064
### To set this linker option in the Visual Studio development environment
6165

@@ -71,5 +75,6 @@ Additionally, LINK performs a full link if any of the following situations occur
7175

7276
## See also
7377

74-
[MSVC linker reference](linking.md)<br/>
75-
[MSVC Linker Options](linker-options.md)
78+
[MSVC linker reference](linking.md)\
79+
[MSVC linker options](linker-options.md)\
80+
[`.ilk` files as linker input](./dot-ilk-files-as-linker-input.md)
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
---
22
description: "Learn more about: LINK Input Files"
33
title: "LINK Input Files"
4-
ms.date: "11/04/2016"
4+
ms.date: 09/01/2022
55
helpviewer_keywords: ["files [C++], LINK", "module definition files", "resources [C++], linker files", "LINK tool [C++], input files", "module definition files, linker files", "input files [C++], LINK", "linker [C++], input files", "import libraries [C++], linker files", "command input to linker files [C++]"]
66
ms.assetid: bb26fcc5-509a-4620-bc3e-b6c6e603a412
77
---
8-
# LINK Input Files
8+
# LINK input files
99

10-
You provide the linker with files that contain objects, import and standard libraries, resources, module definitions, and command input. LINK does not use file extensions to make assumptions about the contents of a file. Instead, LINK examines each input file to determine what kind of file it is.
10+
You provide the linker with files that contain objects, import and standard libraries, resources, module definitions, and command input. LINK doesn't use file extensions to make assumptions about the contents of a file. Instead, LINK examines each input file to determine what kind of file it is.
1111

12-
Object files on the command line are processed in the order they appear on the command line. Libraries are searched in command line order as well, with the following caveat: Symbols that are unresolved when bringing in an object file from a library are searched for in that library first, and then the following libraries from the command line and [/DEFAULTLIB (Specify Default Library)](defaultlib-specify-default-library.md) directives, and then to any libraries at the beginning of the command line.
12+
Object files on the command line are processed in the order they appear on the command line. Libraries are searched in command line order as well, with the following caveat: Symbols that are unresolved when bringing in an object file from a library are searched for in that library first, and then the following libraries from the command line and [`/DEFAULTLIB` (Specify default library)](defaultlib-specify-default-library.md) directives, and then to any libraries at the beginning of the command line.
1313

1414
> [!NOTE]
15-
> LINK no longer accepts a semicolon (or any other character) as the start of a comment in response files and order files. Semicolons are recognized only as the start of comments in module-definition files (.def).
15+
> LINK no longer accepts a semicolon (or any other character) as the start of a comment in response files and order files. Semicolons are recognized only as the start of comments in module-definition files (`.def`).
1616
1717
LINK uses the following types of input files:
1818

19-
- [.obj files](dot-obj-files-as-linker-input.md)
19+
- [`.obj` files](dot-obj-files-as-linker-input.md)
2020

21-
- [.netmodule files](netmodule-files-as-linker-input.md)
21+
- [`.netmodule` files](netmodule-files-as-linker-input.md)
2222

23-
- [.lib files](dot-lib-files-as-linker-input.md)
23+
- [`.lib` files](dot-lib-files-as-linker-input.md)
2424

25-
- [.exp files](dot-exp-files-as-linker-input.md)
25+
- [`.exp` files](dot-exp-files-as-linker-input.md)
2626

27-
- [.def files](dot-def-files-as-linker-input.md)
27+
- [`.def` files](dot-def-files-as-linker-input.md)
2828

29-
- [.pdb files](dot-pdb-files-as-linker-input.md)
29+
- [`.pdb` files](dot-pdb-files-as-linker-input.md)
3030

31-
- [.res files](dot-res-files-as-linker-input.md)
31+
- [`.res` files](dot-res-files-as-linker-input.md)
3232

33-
- [.exe files](dot-exe-files-as-linker-input.md)
33+
- [`.exe` files](dot-exe-files-as-linker-input.md)
3434

35-
- [.txt files](dot-txt-files-as-linker-input.md)
35+
- [`.txt` files](dot-txt-files-as-linker-input.md)
3636

37-
- [.ilk files](dot-ilk-files-as-linker-input.md)
37+
- [`.ilk` files](dot-ilk-files-as-linker-input.md)
3838

3939
## See also
4040

41-
[MSVC linker reference](linking.md)<br/>
42-
[MSVC Linker Options](linker-options.md)
41+
[MSVC linker reference](linking.md)\
42+
[MSVC linker options](linker-options.md)

docs/build/toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,14 +965,16 @@ items:
965965
href: ../build/reference/ignore-ignore-specific-warnings.md
966966
- name: /IGNOREIDL (Don't process attributes into MIDL)
967967
href: ../build/reference/ignoreidl-don-t-process-attributes-into-midl.md
968-
- name: /INFERASANLIBS (Use inferred sanitizer libs)
969-
href: ../build/reference/inferasanlibs.md
968+
- name: /ILK (Name incremental database file)
969+
href: ../build/reference/ilk-name-incremental-database-file.md
970970
- name: /IMPLIB (Name import library)
971971
href: ../build/reference/implib-name-import-library.md
972972
- name: /INCLUDE (Force symbol references)
973973
href: ../build/reference/include-force-symbol-references.md
974974
- name: /INCREMENTAL (Link incrementally)
975975
href: ../build/reference/incremental-link-incrementally.md
976+
- name: /INFERASANLIBS (Use inferred sanitizer libs)
977+
href: ../build/reference/inferasanlibs.md
976978
- name: /INTEGRITYCHECK (Require signature check)
977979
href: ../build/reference/integritycheck-require-signature-check.md
978980
- name: /KEYCONTAINER (Specify a key container to sign an assembly)

0 commit comments

Comments
 (0)