Skip to content

Commit 74926d3

Browse files
author
Colin Robertson
authored
Merge pull request #1 from corob-msft/cr-natvis
Update natvis linker option
2 parents f4a9a63 + 26b394c commit 74926d3

File tree

3 files changed

+69
-20
lines changed

3 files changed

+69
-20
lines changed

docs/build/reference/implib-name-import-library.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,17 @@ translation.priority.ht:
3939
- "zh-tw"
4040
---
4141
# /IMPLIB (Name Import Library)
42-
```
43-
/IMPLIB:filename
44-
```
4542

46-
## Remarks
47-
where:
43+
> /IMPLIB:*filename*
44+
45+
## Parameters
4846

49-
*filename*
50-
A user-specified name for the import library. It replaces the default name.
47+
*filename*
48+
A user-specified name for the import library. It replaces the default name.
5149

5250
## Remarks
53-
The /IMPLIB option overrides the default name for the import library that LINK creates when it builds a program that contains exports. The default name is formed from the base name of the main output file and the extension .lib. A program contains exports if one or more of the following are specified:
51+
52+
The /IMPLIB option overrides the default name for the import library that LINK creates when it builds a program that contains exports. The default name is formed from the base name of the main output file and the extension .lib. A program contains exports if one or more of the following are specified:
5453

5554
- The [__declspec(dllexport)](../../cpp/dllexport-dllimport.md) keyword in the source code
5655

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "-NATVIS (Add Natvis to PDB) | Microsoft Docs"
3+
ms.date: "08/10/2017"
4+
ms.tgt_pltfrm: ""
5+
ms.technology:
6+
- "cpp-tools"
7+
ms.topic: "article"
8+
f1_keywords:
9+
- "/natvis"
10+
- "VC.Project.VCLinkerTool.ImportLIbrary"
11+
dev_langs:
12+
- "C++"
13+
helpviewer_keywords:
14+
- "NATVIS linker option"
15+
- "/NATVIS linker option"
16+
- "-NATVIS linker option"
17+
- "Add Natvis file to PDB"
18+
ms.assetid: 8747fc0c-701a-4796-bb4d-818ab4465cca
19+
author: "corob-msft"
20+
ms.author: "corob"
21+
manager: "ghogen"
22+
---
23+
# /NATVIS (Add Natvis to PDB)
24+
25+
> /NATVIS:*filename*
26+
27+
## Parameters
28+
29+
*filename*
30+
A Natvis file to add to the PDB file. It embeds the debugger visualizations in the Natvis file into the PDB.
31+
32+
## Remarks
33+
34+
The /NATVIS option embeds the debugger visualizations defined in the Natvis file *filename* into the PDB file generated by LINK. This allows the debugger to display the visualizations independently of the .natvis file. You can use multiple /NATVIS options to embed more than one Natvis file in the generated PDB file.
35+
36+
LINK ignores /NATVIS when a PDB file is not created by using a [/DEBUG](../../build/reference/debug-generate-debug-info-options.md) option. For information on creation and use of .natvis files, see [Create custom views of native objects in the Visual Studio debugger](/visualstudio/debugger/create-custom-views-of-native-objects).
37+
38+
### To set this linker option in the Visual Studio development environment
39+
40+
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
41+
42+
2. Select the **Command Line** property page in the **Linker** folder.
43+
44+
3. Add the /NATVIS option to the **Additional Options** text box.
45+
46+
### To set this linker option programmatically
47+
48+
- This option does not have a programmatic equivalent.
49+
50+
## See Also
51+
52+
[Create custom views of native objects in the Visual Studio debugger](/visualstudio/debugger/create-custom-views-of-native-objects)
53+
[Setting Linker Options](../../build/reference/setting-linker-options.md)
54+
[Linker Options](../../build/reference/linker-options.md)

docs/build/reference/wholearchive-include-all-library-object-files.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,24 @@ Force the linker to include all object files in the static library in the linked
2424

2525
## Syntax
2626

27-
```
28-
/WHOLEARCHIVE[:library]
29-
```
27+
> /WHOLEARCHIVE[:*library*]
3028
3129
## Remarks
32-
The /WHOLEARCHIVE option forces the linker to include every object file from either a specified static library, or if no library is specified, from all static libraries specified to the LINK command. To specify the /WHOLEARCHIVE option for multiple libraries, you can use more than one /WHOLEARCHIVE switch on the linker command line. By default, the linker includes object files in the linked output only if they export symbols referenced by other object files in the executable. The /WHOLEARCHIVE option makes the linker treat all object files archived in a static library as if they were specified individually on the linker command line.
3330

34-
The /WHOLEARCHIVE option can be used to re-export all the symbols from a static library. This allows you to make sure that all of your library code, resources, and metadata are included when you create a component from more than one static library. If you see warning LNK4264 when you create a static library that contains Windows Runtime components for export, use the /WHOLEARCHIVE option when linking that library into another component or app.
31+
The /WHOLEARCHIVE option forces the linker to include every object file from either a specified static library, or if no library is specified, from all static libraries specified to the LINK command. To specify the /WHOLEARCHIVE option for multiple libraries, you can use more than one /WHOLEARCHIVE switch on the linker command line. By default, the linker includes object files in the linked output only if they export symbols referenced by other object files in the executable. The /WHOLEARCHIVE option makes the linker treat all object files archived in a static library as if they were specified individually on the linker command line.
3532

36-
### To set this linker option in Visual Studio
33+
The /WHOLEARCHIVE option can be used to re-export all the symbols from a static library. This allows you to make sure that all of your library code, resources, and metadata are included when you create a component from more than one static library. If you see warning LNK4264 when you create a static library that contains Windows Runtime components for export, use the /WHOLEARCHIVE option when linking that library into another component or app.
3734

38-
1. Open the project **Property Pages** dialog box. For more information, see [Working with Project Properties](../../ide/working-with-project-properties.md).
35+
The /WHOLEARCHIVE option was introduced in Visual Studio 2015 Update 2.
3936

40-
2. Expand the **Configuration Properties** node.
37+
### To set this linker option in Visual Studio
4138

42-
3. Expand the **Linker** node.
39+
1. Open the project **Property Pages** dialog box. For more information, see [Working with Project Properties](../../ide/working-with-project-properties.md).
4340

44-
4. Select the **Command Line** property page.
41+
1. Select the **Command Line** property page under **Configuration Properties**, **Linker**.
4542

46-
5. Add the /WHOLEARCHIVE option to the **Additional Options** text box.
43+
1. Add the /WHOLEARCHIVE option to the **Additional Options** text box.
4744

48-
The /WHOLEARCHIVE option was introduced in Visual Studio 2015 Update 2.
4945

5046
## See Also
5147
[Setting Linker Options](../../build/reference/setting-linker-options.md)

0 commit comments

Comments
 (0)