Skip to content

Commit 9f000cf

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [LNK1221, LNK2000]
1 parent 1ff225f commit 9f000cf

21 files changed

+44
-2
lines changed

docs/error-messages/tool-errors/linker-tools-error-lnk1221.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 70654bf9-1520-4fa3-a063-1219dd88abf7
1010

1111
> a subsystem can't be inferred and must be defined
1212
13+
## Remarks
14+
1315
The linker does not have enough information to infer which subsystem you want to target.
1416

1517
To fix this error, use [/SUBSYSTEM](../../build/reference/subsystem-specify-subsystem.md).

docs/error-messages/tool-errors/linker-tools-error-lnk1223.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: c4728c36-daee-462f-a1c7-8733dcdec88e
1010

1111
> invalid or corrupt file: file contains invalid .pdata contributions
1212
13+
## Remarks
14+
1315
For RISC platforms that use pdata, this error will occur if the compiler emitted a .pdata section with unsorted entries.
1416

1517
To fix this issue, try compiling without [/GL (Whole Program Optimization)](../../error-messages/tool-errors/linker-tools-error-lnk1223.md) enabled. Empty function bodies can also cause this error in some cases.

docs/error-messages/tool-errors/linker-tools-error-lnk1224.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: e190b5d0-ce0c-4f65-8cc0-753f1cc9758a
1010

1111
> invalid image base address
1212
13+
## Remarks
14+
1315
You specified an invalid base address for the image. Base addresses must be 64KB aligned (the last four hex digits must be zero) and image base must fit within a 32-bit signed or unsigned value.

docs/error-messages/tool-errors/linker-tools-error-lnk1240.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 7d0e065d-1015-4df0-8370-79c3cf045e1c
1010

1111
> failed to compile IDL content
1212
13+
## Remarks
14+
1315
The linker spawned MIDL to compile embedded IDL but there was a problem. Check the errors specified by MIDL.

docs/error-messages/tool-errors/linker-tools-error-lnk1241.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 7b8b52eb-0231-4521-b52a-2bce8d3e8956
1010

1111
> resource file 'resource file' already specified
1212
13+
## Remarks
14+
1315
This error is generated if you run **cvtres** manually from the command line and if you then pass the resulting .obj file to the linker in addition to other .res files.
1416

1517
To specify multiple .res files, pass them all to the linker as .res files, not from within .obj files created by **cvtres**.

docs/error-messages/tool-errors/linker-tools-error-lnk1245.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 179c8165-ffbb-44cd-9f24-5250f29577cc
1010

1111
> invalid subsystem 'subsystem' specified; /SUBSYSTEM must be WINDOWS, WINDOWSCE, or CONSOLE
1212
13+
## Remarks
14+
1315
[/clr](../../build/reference/clr-common-language-runtime-compilation.md) was used to compile the object and one of the following conditions was true:
1416

1517
- A custom entry point was defined ([/ENTRY](../../build/reference/entry-entry-point-symbol.md)), such that, the linker could not infer a subsystem.

docs/error-messages/tool-errors/linker-tools-error-lnk1256.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ ms.assetid: 55b64b2b-a56b-436c-a55e-ec9c6dcb050e
1010

1111
> ALINK operation failed : reason
1212
13+
## Remarks
14+
1315
A common reason for LNK1256 is an incorrect version number for an assembly. The value 65535 is not allowed for any part of the assembly version number. The valid range for assembly versions is 0 - 65534.
1416

1517
LNK1256 can also be caused if ALINK could not find the named key container. Delete the key container and add it again to the strong name CSP by using [Sn.exe (Strong Name Tool)](/dotnet/framework/tools/sn-exe-strong-name-tool).
1618

1719
Another reason for LNK1256 is a version mismatch between the linker and Alink.dll. This can be caused by a corrupted Visual Studio installation. Use **Programs and Features** in the Windows Control Panel to repair or reinstall Visual Studio.
1820

21+
## Example
22+
1923
The following sample generates LNK1256:
2024

2125
```cpp

docs/error-messages/tool-errors/linker-tools-error-lnk1264.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 23b1aad7-d382-42c1-bae8-db68575c57a8
1010

1111
> /LTCG:PGINSTRUMENT specified but no code generation required; instrumentation failed
1212
13+
## Remarks
14+
1315
**/LTCG:PGINSTRUMENT** was specified but no .obj files were found that were compiled with [/GL](../../build/reference/gl-whole-program-optimization.md). Instrumentation cannot take place and the link failed. There must be at least one .obj file on the command line that is compiled with **/GL** so that the instrumentation can occur.
1416

1517
Profile guided optimization (PGO) is only available in 64-bit compilers.

docs/error-messages/tool-errors/linker-tools-error-lnk1277.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: afca3de0-50cc-4140-af7a-13493a170835
1010

1111
> object record not found in pgd (filename)
1212
13+
## Remarks
14+
1315
When using [/LTCG:PGOPTIMZE](../../build/reference/ltcg-link-time-code-generation.md), the path of one of the input .lib, def, or .obj files was different from the path on which they were found during /LTCG:PGINSTRUMENT. This may be explained by a change in the LIB environment variable after /LTCG:PGINSTRUMENT. The full path to the input files is stored in the .pgd file.
1416

1517
/LTCG:PGOPTIMIZE requires that the inputs be identical to the /LTCG:PGINSTRUMENT phase.

docs/error-messages/tool-errors/linker-tools-error-lnk1282.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 99c13f52-eb80-46ce-a5b9-4537583e32a9
1010

1111
> unable to /REBASE file; it has been signed
1212
13+
## Remarks
14+
1315
You attempted to change the base address of a signed assembly with the /REBASE option for [editbin](../../build/reference/editbin-reference.md). To do this, first change the base address and then sign the assembly.

0 commit comments

Comments
 (0)