Skip to content

Commit 557b0f3

Browse files
authored
Merge pull request #1265 from mikeblome/mb-299
update for another cause for LNK1181
2 parents 90c7812 + 8fc02df commit 557b0f3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Linker Tools Error LNK1181 | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "08/22/2018"
55
ms.technology: ["cpp-diagnostics"]
66
ms.topic: "error-reference"
77
f1_keywords: ["LNK1181"]
@@ -23,11 +23,15 @@ cannot open input file 'filename'
2323

2424
- A **/LIBPATH** statement that specifies the directory containing `filename` is missing.
2525

26-
To resolve the above issues, ensure any files referenced on the linker line are present on the system. Also ensure there is a **/LIBPATH** statement for each directory containing a linker-dependent file.
26+
To resolve the above issues, ensure any files referenced on the linker line are present on the system. Also ensure there is a **/LIBPATH** statement for each directory containing a linker-dependent file.
27+
28+
For more information, see [.lib Files as Linker Input](../../build/reference/dot-lib-files-as-linker-input.md).
2729

2830
Another possible cause for LNK1181 is that a long file name with embedded spaces was not enclosed in quotation marks. In that case, the linker will only recognize a file name up to the first space, and then assume a file extension of .obj. The solution to this situation is to enclose the long file name (path plus file name) in quotation marks.
31+
32+
Compiling with the [/P (Preprocess to a File)](../../build/reference/p-preprocess-to-a-file.md) option can result in LNK1181 because that option suppresses the creation of .obj files.
33+
2934

30-
For more information, see [.lib Files as Linker Input](../../build/reference/dot-lib-files-as-linker-input.md).
3135

3236
## See Also
3337
[/LIBPATH (Additional Libpath)](../../build/reference/libpath-additional-libpath.md)

0 commit comments

Comments
 (0)