Skip to content

Commit ead3449

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#108 from MyYellowBlanket/patch-1
Update linker-tools-error-lnk2019.md
2 parents 37203ec + fd43407 commit ead3449

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Here are some common problems that cause LNK2019:
4949

5050
- **You build a console application by using settings for a Windows application**. If the error message is similar to **unresolved external symbol WinMain referenced in function**`function_name`, link by using **/SUBSYSTEM:CONSOLE** instead of **/SUBSYSTEM:WINDOWS**. For more information about this setting, and for instructions on how to set this property in Visual Studio, see [/SUBSYSTEM (Specify Subsystem)](../../build/reference/subsystem-specify-subsystem.md).
5151

52+
- **You attempt to link 64-bit libraries to 32-bit code, or 32-bit libraries to 64-bit code.** Libraries and object files linked to your code must be compiled for the same architecture as your code. Verify that the libraries your project references are compiled for the same architecture as your project. Make sure the [/LIBPATH](../../build/reference/libpath-additional-libpath.md) or **Additional Library Directories** path option used by the linker points to libraries built for the correct architecture.
53+
5254
- **You use different compiler options for function inlining in different source files.** Using inlined functions defined in .cpp files and mixing function inlining compiler options in different source files can cause LNK2019. For more information, see [Function Inlining Problems](../../error-messages/tool-errors/function-inlining-problems.md).
5355

5456
- **You use automatic variables outside their scope.** Automatic (function scope) variables can only be used in the scope of that function. These variables can't be declared `extern` and used in other source files. For an example, see [Automatic (Function Scope) Variables](../../error-messages/tool-errors/automatic-function-scope-variables.md).

0 commit comments

Comments
 (0)