Skip to content

Commit e324f12

Browse files
authored
Merge pull request #5274 from Rageking8/clean-up-link-options-reference
Clean up "Link options" reference
2 parents 20b9951 + 77d64bd commit e324f12

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
---
2-
description: "Learn more about: Link Options"
3-
title: "Link Options"
2+
title: "Link options"
3+
description: "Learn more about: Link options"
44
ms.date: "11/04/2016"
55
helpviewer_keywords: ["nothrownew.obj", "newmode.obj", "noenv.obj", "psetargv.obj", "legacy_stdio_float_rounding.obj", "loosefpmath.obj", "smallheap.obj", "fp10.obj", "nochkclr.obj", "chkstk.obj", "pcommode.obj", "pnoenv.obj", "link options [C++]", "invalidcontinue.obj", "pnothrownew.obj", "pwsetargv.obj", "pinvalidcontinue.obj", "wsetargv.obj", "binmode.obj", "setargv.obj", "noarg.obj", "pnewmode.obj", "commode.obj", "pthreadlocale.obj", "pbinmode.obj", "threadlocale.obj", "pnoarg.obj"]
6-
ms.assetid: 05b5a77b-9dd1-494b-ae46-314598c770bb
76
---
87
# Link options
98

109
The CRT lib directory includes several small object files that enable specific CRT features without code changes. These object files are called "link options" because you only have to add them to the linker command line to use them. To do this from Visual Studio, in the Solution Explorer right-click your project and choose **Properties**. Under **Configuration Properties**, choose **Linker** > **Input** > **Additional Dependencies** and specify the additional items to add to the link command line.
1110

12-
CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Use the regular versions for native and `/clr` code.
11+
CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Use the regular versions for native and [`/clr`](../build/reference/clr-common-language-runtime-compilation.md) code.
1312

1413
| Native and /clr | Pure mode | Description |
1514
|---|---|---|
16-
| `binmode.obj` | `pbinmode.obj` | Sets the default file-translation mode to binary. See [`_fmode`](./fmode.md). |
15+
| `binmode.obj` | `pbinmode.obj` | Sets the default file-translation mode to binary. See [`_fmode`](fmode.md). |
1716
| `chkstk.obj` | n/a | Provides stack-checking and alloca support when not using the CRT. |
18-
| `commode.obj` | `pcommode.obj` | Sets the global commit flag to "commit". See [`fopen`, `_wfopen`](./reference/fopen-wfopen.md) and [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md). |
19-
| exe_initialize_mta.lib | n/a | Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, don't use it for DLLs. Linking to this file is equivalent to including `combase.h` and defining `_EXE_INITIALIZE_MTA`. Using this link option adds [onecore.lib](/windows/win32/apiindex/windows-umbrella-libraries) to the default library list. If this effect is undesirable (such as using onecore_apiset.lib or other umbrella library), use [/NODEFAULTLIB](../build/reference/nodefaultlib-ignore-libraries.md) to override this behavior and provide an alternative. |
20-
| `fp10.obj` | n/a | Changes the default precision control to 64 bits. See [Math and floating-point support](./floating-point-support.md). |
17+
| `commode.obj` | `pcommode.obj` | Sets the global commit flag to "commit". See [`fopen`, `_wfopen`](reference/fopen-wfopen.md) and [`fopen_s`, `_wfopen_s`](reference/fopen-s-wfopen-s.md). |
18+
| `exe_initialize_mta.lib` | n/a | Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, don't use it for DLLs. Linking to this file is equivalent to including `combase.h` and defining `_EXE_INITIALIZE_MTA`. Using this link option adds [`onecore.lib`](/windows/win32/apiindex/windows-umbrella-libraries) to the default library list. If this effect is undesirable (such as using onecore_apiset.lib or other umbrella library), use [`/NODEFAULTLIB`](../build/reference/nodefaultlib-ignore-libraries.md) to override this behavior and provide an alternative. |
19+
| `fp10.obj` | n/a | Changes the default precision control to 64 bits. See [Math and floating-point support](floating-point-support.md). |
2120
| `invalidcontinue.obj` | `pinvalidcontinue.obj` | Sets a default invalid parameter handler that does nothing, meaning that invalid parameters passed to CRT functions will just set errno and return an error result. |
22-
| `legacy_stdio_float_rounding.obj` | n/a | The printing of floating-point values (for example, when using [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md)) with the Windows 10 19041 Universal C Runtime has been fixed. It now properly rounds exactly representable floating-point numbers, and respects the floating-point rounding requested by [`fesetround`](./reference/fegetround-fesetround2.md). This behavior update is available in Visual Studio 2019 version 16.2 and later. Legacy behavior is used in earlier versions of Visual Studio, or by providing this link option. |
21+
| `legacy_stdio_float_rounding.obj` | n/a | The printing of floating-point values (for example, when using [`printf`](reference/printf-printf-l-wprintf-wprintf-l.md)) with the Windows 10 19041 Universal C Runtime has been fixed. It now properly rounds exactly representable floating-point numbers, and respects the floating-point rounding requested by [`fesetround`](reference/fegetround-fesetround2.md). This behavior update is available in Visual Studio 2019 version 16.2 and later. Legacy behavior is used in earlier versions of Visual Studio, or by providing this link option. |
2322
| `loosefpmath.obj` | n/a | Ensures that floating point code tolerates denormal values. |
24-
| `newmode.obj` | `pnewmode.obj` | Causes [`malloc`](./reference/malloc.md) to call the new handler on failure. See [`_set_new_mode`](./reference/set-new-mode.md), [`_set_new_handler`](./reference/set-new-handler.md), [`calloc`](./reference/calloc.md), and [`realloc`](./reference/realloc.md). |
23+
| `newmode.obj` | `pnewmode.obj` | Causes [`malloc`](reference/malloc.md) to call the new handler on failure. See [`_set_new_mode`](reference/set-new-mode.md), [`_set_new_handler`](reference/set-new-handler.md), [`calloc`](reference/calloc.md), and [`realloc`](reference/realloc.md). |
2524
| `noarg.obj` | `pnoarg.obj` | Disables all processing of argc and argv. |
2625
| `nochkclr.obj` | n/a | Does nothing. Remove from your project. |
2726
| `noenv.obj` | `pnoenv.obj` | Disables the creation of a cached environment for the CRT. |
@@ -32,4 +31,4 @@ CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and
3231

3332
## See also
3433

35-
- [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md)
34+
- [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](crt-library-features.md)

0 commit comments

Comments
 (0)