Skip to content

Commit 667f2f8

Browse files
author
Colin Robertson
committed
tweakage
1 parent f673574 commit 667f2f8

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ Warning LNK4049 is a more general version of [Linker Tools Warning LNK4217](link
1717

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

20-
- Performing incremental linking by using the [/INCREMENTAL](../../build/reference/incremental-link-incrementally.md) option.
20+
- When using the [/INCREMENTAL](../../build/reference/incremental-link-incrementally.md) option.
2121

22-
- Performing whole-program optimization by using the [/LTCG](../../build/reference/ltcg-link-time-code-generation.md) option.
22+
- When using the [/LTCG](../../build/reference/ltcg-link-time-code-generation.md) option.
2323

24-
To resolve LNK4049, try one of the following:
24+
To resolve LNK4049, try one of the following procedures:
2525

26-
- Remove the `__declspec(dllimport)` name declaration from the forward declaration of the symbol which 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).
26+
- 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. Recompiling the application will generate Warning LNK4217, which will include the name of the function from which the imported symbol was referenced. 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 from the imported symbol and re-enable incremental linking or whole-program optimization as required.
2929

30-
Although the final generated code will behave 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 option [/clr](../../build/reference/clr-common-language-runtime-compilation.md).
30+
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

3232
For more information on import and export data declarations, see [dllexport, dllimport](../../cpp/dllexport-dllimport.md).
3333

@@ -45,7 +45,7 @@ __declspec(dllexport) int func()
4545
}
4646
```
4747
48-
The second module generates an object file containing a forward declaration to the function exported in the first module, along with a call to this function inside the `main` function. Linking this module with the first module will generate LNK4049. Removing the `__declspec(dllimport)` declaration will resolve the warning.
48+
The second module generates an object file containing a forward declaration to the function exported in the first module, along with a call to this function inside the `main` function. Linking this module with the first module will generate LNK4049. Remove the `__declspec(dllimport)` modifier from the declaration to resolve the warning.
4949
5050
```cpp
5151
// LNK4049b.cpp

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.assetid: 280dc03e-5933-4e8d-bb8c-891fbe788738
1313

1414
`symbol` is the symbol name that's defined within the image. `function` is the function that's importing the symbol.
1515

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

1818
LNK4217 can also occur if you attempt to link two modules together, when instead you should compile the second module with the import library of the first module.
1919

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This warning is generated by the linker when you declare a symbol by using the `
1616

1717
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.
1818

19-
To resolve LNK4286, remove the `__declspec(dllimport)` name declaration from the forward declaration of the symbol which triggered LNK4286.
19+
To resolve LNK4286, remove the `__declspec(dllimport)` name declaration from the forward declaration of the symbol that triggered LNK4286.
2020

21-
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 option [/clr](../../build/reference/clr-common-language-runtime-compilation.md).
21+
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.
2222

2323
For more information on import and export data declarations, see [dllexport, dllimport](../../cpp/dllexport-dllimport.md).
2424

0 commit comments

Comments
 (0)