Skip to content

Commit 986fad6

Browse files
committed
edit pass: header-unit-walkthroughs
1 parent 865933c commit 986fad6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/build/walkthrough-import-stl-header-units.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Follow these steps to set the options that cause the build system to scan for im
8484
1. In the left pane of the project property pages, select **C/C++** > **General**.
8585
1. Set **Scan Sources for Module Dependencies** to **Yes**. Because we're setting the project property, all sources in this project will be scanned.
8686

87-
Change the C++ language standard for the compiler. The [`/std:c++latest`](./reference/std-specify-language-standard-version.md) switch is required if you're using header units:
87+
Change the C++ language standard for the compiler. The [`/std:c++latest`](./reference/std-specify-language-standard-version.md) switch is required if you're using header units.
8888

8989
1. In the left pane of the project property pages, select **Configuration Properties** > **General**.
9090
1. In the **C++ Language Standard** list, select **Preview - Features from the Latest C++ Working Draft (/std:c++latest)**:
@@ -99,7 +99,7 @@ You can fine-tune this balance by not scanning for import dependencies. Instead,
9999

100100
## <a name="approach2"></a>Approach 2: Build a static library project
101101

102-
The more flexible way to consume STL headers is to create one or more static library projects that build the header units from the STL headers you want to reuse. Then reference the library project or projects from the projects that need those STL headers. Modules and header units built in a static library project are automatically available to referencing projects. The project system automatically adds the appropriate [`/headerUnit](./reference/headerunit.md) switches to the command line so that the header units can be imported by the referencing projects.
102+
The more flexible way to consume STL headers is to create one or more static library projects that build the header units from the STL headers you want to reuse. Then reference the library project or projects from the projects that need those STL headers. Modules and header units built in a static library project are automatically available to referencing projects. The project system automatically adds the appropriate [/headerUnit](./reference/headerunit.md) switches to the command line so that the referencing projects can import the header units.
103103

104104
This option ensures that header units for a particular header will be built only once. It's similar to using a shared precompiled header file, but it's much easier.
105105

@@ -139,7 +139,7 @@ Set project properties to share the header units from this project.
139139
140140
## Reference the shared header unit project
141141
142-
Next, create a project that will use the built `<vector>` and `<iostream>` shared header project:
142+
Next, create a project that will use the built `<vector>` and `<iostream>` shared header project.
143143
144144
1. With the current solution still open, on the Visual Studio menu, select **File** > **Add** > **New Project**.
145145
1. Add a C++ console app project. For this example, call it **Walkthrough**.
@@ -165,7 +165,7 @@ Change the **C++ Language Standard** for the compiler. To use header units, you
165165
166166
In the **Walkthrough** project, add a reference to the **SharedPrj** project.
167167
168-
1. In the **Walkthrough** project, select the **References** node, and then select **Add Reference**. Select **SharedPrj** from the list of projects.
168+
1. In the **Walkthrough** project, select the **References** node, and then select **Add Reference**. Select **SharedPrj** in the list of projects:
169169
:::image type="content" source="./media/add-reference-to-walkthrough.png" alt-text="Screenshot that shows the Add Reference dialog. It's used to add a reference to the Walkthrough project.":::
170170
Now that you've added this reference, the build system will use the header units built by **SharedPrj** whenever an `import` in the **Walkthrough** project matches one of the built header units in **SharedPrj**.
171171
1. Select **OK** to close the **Add Reference** dialog.
@@ -200,7 +200,7 @@ These settings control the visibility of header units to the build system:
200200
201201
- **Public Include Directories**. Specifies project directories for header units that should be automatically added to the include path in referencing projects.
202202
- **Public C++ Module Directories**. Specifies which project directories contain header units that should be available to referencing projects. This setting allows you to make some header units public. It provides a place that's visible to other projects where you can put header units that can be shared. If you use this setting, you might also want to specify **Public Include Directories**. If you do, your public headers are automatically added to the include path in referencing projects.
203-
- **All Modules are Public**. To use header units built as a part of a DLL project, the symbols have to be exported from the DLL. To do so, set this property to **Yes**.
203+
- **All Modules are Public**. When you use header units built as a part of a DLL project, the symbols have to be exported from the DLL. To do so, set this property to **Yes**.
204204
205205
## Use a prebuilt module file
206206
@@ -218,7 +218,7 @@ To access this setting:
218218
219219
If you reference two or more projects that built two or more header units with the same name, or that built two or more header units for the same header file, there will be multiple header units to choose from for the same import. You might have different versions of the header unit that were built with different compiler settings, for example, and need to inform the compiler which one to use.
220220
221-
Use the project properties **C/C++** > **Additional Header Unit Dependencies** to resolve collisions by specifying which header unit should be used. Otherwise, you can't predict which one will be picked.
221+
Use the project properties **C/C++** > **Additional Header Unit Dependencies** setting to resolve collisions by specifying which header unit should be used. Otherwise, you can't predict which one will be picked.
222222
223223
To access this setting:
224224
1. On the main menu, select **Project** > **Properties**. The project properties page opens.

0 commit comments

Comments
 (0)