You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/reference/compiler-options-listed-alphabetically.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ This table contains an alphabetical list of compiler options. For a list of comp
111
111
|[`/homeparams`](homeparams-copy-register-parameters-to-stack.md)| Forces parameters passed in registers to be written to their locations on the stack upon function entry. This compiler option is only for the x64 compilers (native and cross compile). |
112
112
|[`/hotpatch`](hotpatch-create-hotpatchable-image.md)| Creates a hotpatchable image. |
113
113
|[`/I<dir>`](i-additional-include-directories.md)| Searches a directory for include files. |
114
-
|**`/ifcOutput`**| Specify output file or directory for *`.ifc`* files. |
114
+
|[`/ifcOutput`](ifc-output.md)| Specify output file name or directory for built*`.ifc`* files. |
115
115
|[`/interface`](interface.md)| Treat the input file as a module interface unit. |
116
116
|[`/internalPartition`](internal-partition.md)| Treat the input file as an internal partition unit. |
117
117
|[`/J`](j-default-char-type-is-unsigned.md)| Changes the default **`char`** type. |
helpviewer_keywords: ["/ifcOutput", "Specify where the compiled `.ifc` should go"]
9
+
---
10
+
# `/ifcOutput`
11
+
12
+
This switch tells the compiler where to output built *`.ifc`* files. If the destination is a directory, then the compiler generates the name of each `.ifc` file based on the interface name or the header unit name.
13
+
14
+
## Syntax
15
+
16
+
> **`/ifcOutput`***`filename`*\
17
+
> **`/ifcOutput`***`directory\`*
18
+
19
+
## Remarks
20
+
21
+
By default, the compiler derives the name for each generated *`.ifc`* file from the module interface name. For example, given a module name `MyModule`, the generated *`.ifc`* will be named *`MyModule.ifc`*, unless you override the name with the `/ifcOutput` switch.
22
+
23
+
Use this switch to specify an alternative *`.ifc`* filename or directory. If you want to use the default built *`.ifc`* filenames, but specify a directory where they should be built, ensure that you add a trailing backslash (`\`) to the directory name.
24
+
25
+
When you're building multiple *`.ifc`* files, only use the directory form of the `/ifcOutput` switch. If you provide multiple `/ifcOutput` switches, the compiler only uses the last one.
26
+
27
+
If you build with the [`/MP` (Build with multiple processes)](mp-build-with-multiple-processes.md) switch, we recommend that you use the directory form of the `/ifcOutput` switch if you have multiple input module files.
28
+
29
+
In the following example, the *`.ifc`* file for module `m` defined in *`m.ixx`* is built as `c:\example\m.ifc`.
### To set this compiler option in the Visual Studio development environment
42
+
43
+
1. To apply the **`/ifcOutput`** option to one file in the IDE, select the file in **Solution Explorer**. Right-click to open the context menu and select **Properties** to open the **Property Pages** dialog.
44
+
45
+
1. Set the **Configuration** dropdown to **All Configurations**. Set the **Platform** dropdown to **All Platforms**.
46
+
47
+
1. Open the **Configuration Properties** > **C/C++** > **Output Files** property page.
48
+
49
+
1. Use the dropdown control to modify the **Module Output File Name** property to a directory name (ending in `\`) or an alternate file name. Or you can specify a directory + file name, for example, `c:\example\mymodule.ifc`. Choose **OK** or **Apply** to save your changes.
50
+
51
+
Alternatively, you can specify the `/ifcOutput` switch with a right-click on the project name in the **Solution Explorer** > **Configuration Properties** > **C/C++** > **Command Line**.
52
+
53
+
## See also
54
+
55
+
[Overview of modules in C++](../../cpp/modules-cpp.md)\
56
+
[Using C++ Modules in MSVC from the Command Line](https://devblogs.microsoft.com/cppblog/using-cpp-modules-in-msvc-from-the-command-line-part-1/)
Copy file name to clipboardExpand all lines: docs/build/walkthrough-header-units.md
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ monikerRange: '>=msvc-160'
11
11
12
12
# Walkthrough: Build and import header units in Microsoft Visual C++
13
13
14
-
This article is about building and importing header units with Visual Studio 2022. To learn how to import Standard Template Library headers as header units, see [Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md).
14
+
This article is about building and importing header units with Visual Studio 2022. To learn how to import C++ standard library headers as header units, see [Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md). For an even faster and more robust way to import the standard library, see [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md).
15
15
16
16
Header units are the recommended alternative to [precompiled header files](creating-precompiled-header-files.md) (PCH). Header units are easier to set up and use, are significantly smaller on disk, provide similar performance benefits, and are more flexible than a [shared PCH](https://devblogs.microsoft.com/cppblog/shared-pch-usage-sample-in-visual-studio).
17
17
@@ -49,7 +49,7 @@ There are several ways to compile a file into a header unit:
49
49
50
50
-**Automatically scan for and build header units**. This approach is convenient, but is best suited to smaller projects because it doesn't guarantee optimal build throughput. For details about this approach, see [Approach 2: Automatically scan for header units](#approach2).
51
51
52
-
- As mentioned in the introduction, you can build and import STL header files as header units and automatically treat `#include` for STL library headers as `import` without rewriting your code. To see how, visit [Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md).
52
+
- As mentioned in the introduction, you can build and import STL header files as header units, and automatically treat `#include` for STL library headers as `import` without rewriting your code. To see how, visit [Walkthrough: Import STL libraries as header units](walkthrough-import-stl-header-units.md).
53
53
54
54
## <aname="approach1"></a>Approach 1: Translate a specific file into a header unit
55
55
@@ -157,4 +157,5 @@ Enabling the new preprocessor affects the processing of variadic macros. For mor
Copy file name to clipboardExpand all lines: docs/build/walkthrough-import-stl-header-units.md
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ monikerRange: '>=msvc-160'
10
10
---
11
11
# Walkthrough: Import STL libraries as header units
12
12
13
-
This walkthrough shows how to import C++ Standard Template Library (STL) libraries as header units in Visual Studio.
13
+
This walkthrough shows how to import C++ Standard Template Library (STL) libraries as header units in Visual Studio. For an even faster and more robust way to import the standard library, see [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md).
14
14
15
15
Importing an STL header as a header unit is simpler than using [precompiled header files](creating-precompiled-header-files.md). Header units are easier to set up and use, are substantially smaller on disk, provide similar performance benefits, and are more flexible than a [shared PCH](https://devblogs.microsoft.com/cppblog/shared-pch-usage-sample-in-visual-studio).
16
16
@@ -219,5 +219,6 @@ The main consideration for whether to use this approach is the balance between c
219
219
220
220
## See also
221
221
222
-
[Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md) \
222
+
[Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md)\
223
+
[Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md)\
Copy file name to clipboardExpand all lines: docs/c-runtime-library/crt-library-features.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
-
title: "C runtime (CRT) and C++ Standard Library (STL) lib files"
3
-
description: "List of Microsoft C runtime and C++ Standard Library (STL) lib files that you can link against and their associated compiler options and preprocessor directives."
2
+
title: "C runtime (CRT) and C++ standard library (STL) lib files"
3
+
description: "List of Microsoft C runtime and C++ standard library (STL) lib files that you can link against and their associated compiler options and preprocessor directives."
# C runtime (CRT) and C++ Standard Library (STL) `.lib` files
9
+
# C runtime (CRT) and C++ standard library (STL) `.lib` files
10
10
11
11
This article lists the Microsoft C runtime library `.lib` files that you can link against when you develop your application, and their associated compiler options and preprocessor directives.
12
12
@@ -15,13 +15,13 @@ See [Redistributing Visual C++ files](../windows/redistributing-visual-cpp-files
15
15
See [C runtime library reference](./c-run-time-library-reference.md) if you're looking for API reference for the C runtime library.
16
16
17
17
>[!NOTE]
18
-
> Microsoft's implementation of the C++ Standard Library is often referred to as the *STL* or *Standard Template Library*. Although *C++ Standard Library* is the official name of the library as defined in ISO 14882, due to the popular use of "STL" and "Standard Template Library" in search engines, we occasionally use those names to make it easier to find our documentation.
18
+
> Microsoft's implementation of the C++ standard library is often referred to as the *STL* or *Standard Template Library*. Although *C++ standard library* is the official name of the library as defined in ISO 14882, due to the popular use of "STL" and "Standard Template Library" in search engines, we occasionally use those names to make it easier to find our documentation.
19
19
20
-
From a historical perspective, "STL" originally referred to the Standard Template Library written by Alexander Stepanov. Parts of that library were standardized in the C++ Standard Library. The Standard Library also incorporated the ISO C runtime library, parts of the Boost library, and other functionality. Sometimes "STL" is used to refer to the containers and algorithms parts of the C++ Standard Library adapted from Stepanov's STL. In this documentation, Standard Template Library (STL) refers to the C++ Standard Library as a whole.
20
+
From a historical perspective, "STL" originally referred to the Standard Template Library written by Alexander Stepanov. Parts of that library were standardized in the C++ standard library. The standard library also incorporates the ISO C runtime library, parts of the Boost library, and other functionality. Sometimes "STL" is used to refer to the containers and algorithms parts of the C++ standard library adapted from Stepanov's STL. In this documentation, Standard Template Library (STL) refers to the C++ standard library as a whole.
21
21
22
22
## C runtime `.lib` files
23
23
24
-
The C runtime Library (CRT) is the part of the C++ Standard Library that incorporates the ISO C standard library. The Visual C++ libraries that implement the CRT support native code development, and both mixed native and managed code. All versions of the CRT support multi-threaded development. Most of the libraries support both static linking, to link the library directly into your code, or dynamic linking to let your code use common DLL files.
24
+
The ISO C standard library is part of the C++ standard library. The Visual C++ libraries that implement the CRT support native code development, and both mixed native and managed code. All versions of the CRT support multi-threaded development. Most of the libraries support both static linking, to link the library directly into your code, or dynamic linking to let your code use common DLL files.
25
25
26
26
In Visual Studio 2015, the CRT was refactored into new binaries. The Universal CRT (UCRT) contains the functions and globals exported by the standard C99 CRT library. The UCRT is now a Windows component, and ships as part of Windows 10 and later versions. The static library, DLL import library, and header files for the UCRT are now found in the Windows SDK. When you install Visual C++, Visual Studio setup installs the subset of the Windows SDK required to use the UCRT. You can use the UCRT on any version of Windows supported by Visual Studio 2015 and later versions. You can redistribute it using vcredist for supported versions of Windows other than Windows 10 or later. For more information, see [Redistributing Visual C++ Files](../windows/redistributing-visual-cpp-files.md).
27
27
@@ -47,7 +47,7 @@ This table lists the libraries that implement the vcruntime library.
47
47
48
48
> [!NOTE]
49
49
> When the UCRT was refactored, the Concurrency Runtime functions were moved into
50
-
*`concrt140.dll`*, which was added to the C++ redistributable package. This DLL is required for C++ parallel containers and algorithms such as `concurrency::parallel_for`. In addition, the C++ Standard Library requires this DLL on Windows XP to support synchronization primitives, because Windows XP doesn't have condition variables.
50
+
*`concrt140.dll`*, which was added to the C++ redistributable package. This DLL is required for C++ parallel containers and algorithms such as `concurrency::parallel_for`. In addition, the C++ standard library requires this DLL on Windows XP to support synchronization primitives, because Windows XP doesn't have condition variables.
51
51
52
52
The code that initializes the CRT is in one of several libraries, based on whether the CRT library is statically or dynamically linked, or native, managed, or mixed code. This code handles CRT startup, internal per-thread data initialization, and termination. It's specific to the version of the compiler used. This library is always statically linked, even when using a dynamically linked UCRT.
53
53
@@ -78,16 +78,16 @@ To build a debug version of your application, the [`_DEBUG`](./debug.md) flag mu
78
78
79
79
This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the `<tgmath.h>` header isn't supported. In all versions, the `CX_LIMITED_RANGE` and `FP_CONTRACT` pragma macros aren't supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use **`/Zc`** compiler conformance options and specify linker options to control some aspects of library conformance.
80
80
81
-
## C++ Standard Library (STL) `.lib` files
81
+
## C++ standard library (STL) `.lib` files
82
82
83
-
| C++ Standard Library| Characteristics | Option | Preprocessor directives |
83
+
| C++ standard library| Characteristics | Option | Preprocessor directives |
84
84
|--|--|--|--|
85
85
|*`libcpmt.lib`*| Multithreaded, static link |**`/MT`**|`_MT`|
86
86
|*`msvcprt.lib`*| Multithreaded, dynamic link (import library for *`msvcp<version>.dll`*) |**`/MD`**|`_MT`, `_DLL`|
87
87
|*`libcpmtd.lib`*| Multithreaded, static link |**`/MTd`**|`_DEBUG`, `_MT`|
88
88
|*`msvcprtd.lib`*| Multithreaded, dynamic link (import library for *`msvcp<version>d.dll`*) |**`/MDd`**|`_DEBUG`, `_MT`, `_DLL`|
89
89
90
-
When you build a release version of your project, one of the basic C runtime libraries (*`libcmt.lib`*, *`msvcmrt.lib`*, *`msvcrt.lib`*) is linked by default, depending on the compiler option you choose (multithreaded, DLL, **`/clr`**). If you include one of the [C++ Standard Library header files](../standard-library/cpp-standard-library-header-files.md) in your code, a C++ Standard Library will be linked automatically by Visual C++ at compile time. For example:
90
+
When you build a release version of your project, one of the basic C runtime libraries (*`libcmt.lib`*, *`msvcmrt.lib`*, *`msvcrt.lib`*) is linked by default, depending on the compiler option you choose (multithreaded, DLL, **`/clr`**). If you include one of the [C++ standard library header files](../standard-library/cpp-standard-library-header-files.md) in your code, a C++ standard library will be linked automatically by Visual C++ at compile time. For example:
0 commit comments