Skip to content

Commit c4b91a3

Browse files
author
Colin Robertson
committed
Fiddle with wording per YongKang review
1 parent 667f2f8 commit c4b91a3

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

docs/error-messages/tool-errors/linker-tools-warning-lnk4049.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ms.assetid: 5fd5fb24-c860-4149-a557-0ac26a65d97c
1111
1212
The symbol was both exported from and imported to the program.
1313

14-
This warning is generated by the linker when you declare a symbol by using the `__declspec(dllexport)` storage-class attribute in one object file and reference it by using the `__declspec(dllimport)` attribute in another.
14+
This warning is generated by the linker when you define a symbol in one object file and reference it by using the `__declspec(dllimport)` declaration modifier in another.
1515

16-
Warning LNK4049 is a more general version of [Linker Tools Warning LNK4217](linker-tools-warning-lnk4217.md). The linker generates Warning LNK4049 when it can't determine which function or object file referenced the imported symbol.
16+
Warning LNK4049 is a more general version of [Linker Tools Warning LNK4217](linker-tools-warning-lnk4217.md). The linker generates warning LNK4049 when it can't determine which function or object file referenced the imported symbol.
1717

1818
The common cases where LNK4049 is generated instead of LNK4217 are:
1919

@@ -25,7 +25,7 @@ To resolve LNK4049, try one of the following procedures:
2525

2626
- Remove the `__declspec(dllimport)` modifier from the forward declaration of the symbol that triggered LNK4049. You can search for symbols within a binary image by using the **DUMPBIN** utility. The **DUMPBIN /SYMBOLS** switch displays the COFF symbol table of the image. For more information on the **DUMPBIN** utility, see [DUMPBIN Reference](../../build/reference/dumpbin-reference.md).
2727

28-
- Temporarily disable incremental linking and whole-program optimization. When recompiled, the application generates Warning LNK4217, which includes the name of the function which references the imported symbol. Remove the `__declspec(dllimport)` declaration from the imported symbol and re-enable incremental linking or whole-program optimization as required.
28+
- Temporarily disable incremental linking and whole-program optimization. When recompiled, the application generates Warning LNK4217, which includes the name of the function which references the imported symbol. Remove the `__declspec(dllimport)` declaration modifier from the imported symbol and re-enable incremental linking or whole-program optimization as required.
2929

3030
Although the final generated code behaves correctly, the code generated to call the imported function is less efficient than calling the function directly. This warning doesn't appear when you compile by using the [/clr](../../build/reference/clr-common-language-runtime-compilation.md) option.
3131

docs/error-messages/tool-errors/linker-tools-warning-lnk4217.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ ms.assetid: 280dc03e-5933-4e8d-bb8c-891fbe788738
99

1010
> symbol '*symbol*' defined in '*filename_1.obj*' is imported by '*filename_2.obj*' in function '*function*'
1111
12-
[__declspec(dllimport)](../../cpp/dllexport-dllimport.md) was specified for a symbol even though the symbol is defined locally. Remove the `__declspec` modifier to resolve this warning.
12+
[__declspec(dllimport)](../../cpp/dllexport-dllimport.md) was specified for a symbol even though the symbol is defined in an object file in the same image. Remove the `__declspec(dllimport)` modifier to resolve this warning.
1313

14-
`symbol` is the symbol name that's defined within the image. `function` is the function that's importing the symbol.
14+
*symbol* is the symbol name that's defined within the image. *function* is the function that's importing the symbol.
1515

1616
This warning doesn't appear when you compile by using the [/clr](../../build/reference/clr-common-language-runtime-compilation.md) option.
1717

docs/error-messages/tool-errors/linker-tools-warning-lnk4286.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ helpviewer_keywords: ["LNK4286"]
88

99
> symbol '*symbol*' defined in '*filename_1.obj*' is imported by '*filename_2.obj*'
1010
11-
The symbol was both exported from and imported to the program.
11+
[__declspec(dllimport)](../../cpp/dllexport-dllimport.md) was specified for *symbol* even though the symbol is defined in object file *filename_1.obj* in the same image. Remove the `__declspec(dllimport)` modifier to resolve this warning.
1212

1313
## Remarks
1414

15-
This warning is generated by the linker when you declare a symbol by using the `__declspec(dllexport)` storage-class attribute in one object file, and reference it by using the `__declspec(dllimport)` attribute in another, in the same module.
16-
1715
Warning LNK4286 is a more general version of [Linker Tools Warning LNK4217](linker-tools-warning-lnk4217.md). The linker generates Warning LNK4286 when it can tell which object file referenced the symbol, but not which function.
1816

19-
To resolve LNK4286, remove the `__declspec(dllimport)` name declaration from the forward declaration of the symbol that triggered LNK4286.
17+
To resolve LNK4286, remove the `__declspec(dllimport)` declaration modifier from the forward declaration of *symbol* referenced in *filename_2.obj*.
2018

2119
Although the final generated code behaves correctly, the code generated to call an imported function is less efficient than calling the function directly. This warning doesn't appear when you compile by using the [/clr](../../build/reference/clr-common-language-runtime-compilation.md) option.
2220

0 commit comments

Comments
 (0)