You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/error-messages/tool-errors/linker-tools-warning-lnk4049.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The symbol was both exported from and imported to the program.
13
13
14
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.
15
15
16
-
Warning LNK4049 is a more general version of [Linker Tools Warning LNK4217](../../error-messages/tool-errors/linker-tools-warning-lnk4217.md) and [Linker Tools Warning LNK4286](linker-tools-warning-lnk4286.md). The linker generates Warning LNK4049 when it cannot determine from which function the imported symbol was referenced.
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.
17
17
18
18
The common cases where LNK4049 is generated instead of LNK4217 are:
19
19
@@ -25,9 +25,9 @@ To resolve LNK4049, try one of the following:
25
25
26
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).
27
27
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 enable incremental linking or whole-program optimization as required.
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.
29
29
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 will not appear when you compile by using the option [/clr](../../build/reference/clr-common-language-runtime-compilation.md).
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).
31
31
32
32
For more information on import and export data declarations, see [dllexport, dllimport](../../cpp/dllexport-dllimport.md).
0 commit comments