Skip to content

Commit 5d497fc

Browse files
Merge pull request #5878 from TylerMSFT/nodefaultlib
add customer requested info about #pragma
2 parents 47ff57e + e650008 commit 5d497fc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/build/reference/nodefaultlib-ignore-libraries.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
description: "Learn more about: /NODEFAULTLIB (Ignore libraries)"
33
title: "/NODEFAULTLIB (Ignore libraries)"
4-
ms.date: 09/09/2022
4+
ms.date: 04/16/2025
55
f1_keywords: ["VC.Project.VCLinkerTool.IgnoreAllDefaultLibraries", "VC.Project.VCLinkerTool.IgnoreDefaultLibraryNames", "VC.Project.VCLinkerTool.OVERWRITEAllDefaultLibraries", "VC.Project.VCLinkerTool.OVERWRITEDefaultLibraryNames", "/nodefaultlib"]
66
helpviewer_keywords: ["default libraries, removing", "-NODEFAULTLIB linker option", "libraries, ignore", "NODEFAULTLIB linker option", "/NODEFAULTLIB linker option", "ignore libraries linker option"]
7-
ms.assetid: 7270b673-6711-468e-97a7-c2925ac2be6e
87
---
98
# `/NODEFAULTLIB` (Ignore Libraries)
109

11-
The **`/NODEFAULTLIB`** linker option tells the linker to remove one or more default libraries from the list of libraries it searches when it resolves external references.
10+
Unless an optional library name is provided, the `/NODEFAULTLIB` linker option removes all libraries not explicitly specified to the linker. This includes `#pragma`, cl command line switches, libs referenced in other libs, and so on.
1211

1312
## Syntax
1413

@@ -34,11 +33,8 @@ If you use **`/NODEFAULTLIB`** to build your program without the C run-time libr
3433
### To set this linker option in the Visual Studio development environment
3534

3635
1. Open the project's **Property Pages** dialog box. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
37-
3836
1. Select the **Configuration Properties** > **Linker** > **Input** property page.
39-
4037
1. Modify the **Ignore All Default Libraries** property. Or, specify a semicolon-separated list of the libraries you want to ignore in the **Ignore Specific Default Libraries** property. The **Linker** > **Command Line** property page shows the effect of the changes you make to these properties.
41-
4238
1. Choose **OK** or **Apply** to save your changes.
4339

4440
### To set this linker option programmatically

0 commit comments

Comments
 (0)