Skip to content

Commit 9d00f03

Browse files
TylerMSFTTylerMSFT
authored andcommitted
add /ifcMap article
1 parent 0a2089c commit 9d00f03

File tree

3 files changed

+98
-3
lines changed

3 files changed

+98
-3
lines changed

docs/build/reference/ifc-map.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: "/ifcMap"
3+
description: "Map named modules and header units to IFC files."
4+
ms.date: 10/13/2023
5+
author: "tylermsft"
6+
ms.author: "twhitney"
7+
f1_keywords: ["/ifcMap", "VC.Project.VCCLCompilerTool.ifcMap"]
8+
helpviewer_keywords: ["/ifcMap", "Specify named module and header unit mappings to IFC files."]
9+
---
10+
# `/ifcMap`
11+
12+
This switch tells the compiler where to find the [TOML](https://toml.io/en/) file that maps named modules and header units to their respective IFC (.ifc) files.
13+
14+
## Syntax
15+
16+
> **`/ifcMap`** *`filename`*
17+
18+
## Remarks
19+
20+
The *`filename`* argument specifies a TOML file (Tom's Obvious Minimal Language). The file can be relative to the working directory of the compiler or an absolute path.
21+
Multiple `/ifcMap` arguments may be provided to the compiler.
22+
23+
The TOML file may contain a mix of `[[module]]` and `[[header-unit]]` references. Syntax errors or unrecognized table names result in compiler error `C7696` (TOML parse error).
24+
25+
### TOML for named modules
26+
27+
The format of the TOML file must adhere to the following specification for named modules:
28+
29+
```cpp
30+
# Using literal strings
31+
[[module]]
32+
name = 'M'
33+
ifc = 'C:\modules\M.ifc'
34+
35+
# Using basic strings
36+
[[module]]
37+
name = "N"
38+
ifc = "C:\\modules\\N.ifc"
39+
```
40+
41+
This TOML file maps the named modules 'M' and 'N' to their respective IFC files. The equivalent [`/reference'](module-reference.md) is:
42+
43+
```cmd
44+
/reference M=C:\modules\M.ifc /reference N=C:\modules\N.ifc
45+
```
46+
47+
When `[[module]]` is specified in the TOML, the compiler implicitly enables [`/Zc:preprocessor`](zc-preprocessor.md) similarly to how it is implicitly enabled when [`/module`](module.md) is used. For more information about the behavior of the 'angle' and 'quote' lookup methods, see the [/module Remarks](module.md#remarks).
48+
49+
For more information about what types of module names are valid for the `name` field, see [`/reference remarks`](module-reference.md#remarks).
50+
51+
### TOML for header units
52+
53+
The format of the TOML for header units is:
54+
55+
```
56+
# Using literal strings
57+
[[header-unit]]
58+
name = ['quote', 'my-utility.h']
59+
ifc = 'C:\header-units\my-utility.h.ifc'
60+
61+
[[header-unit]]
62+
name = ['angle', 'vector']
63+
ifc = 'C:\header-units\vector.ifc'
64+
65+
# Using basic strings
66+
[[header-unit]]
67+
name = ["quote", "my-engine.h"]
68+
ifc = "C:\\header-units\\my-engine.h.ifc"
69+
70+
[[header-unit]]
71+
name = ["angle", "algorithm"]
72+
ifc = "C:\\header-units\\algorithm.ifc"
73+
```
74+
75+
When `[[header-unit]]` is specified in the TOML, the compiler implicitly enables [`/Zc:preprocessor`](zc-preprocessor.md) like how it is implicitly enabled when [`/headerUnit`](headerunit.md) is used. For more information about the behavior of the 'angle' and 'quote' lookup methods, see the [/headerUnit Remarks](headerunit.md#remarks).
76+
77+
### To set this compiler option in the Visual Studio development environment
78+
79+
1. To apply the **`/ifcMap`** option 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.
80+
81+
1. Set the **Configuration** dropdown to **All Configurations**. Set the **Platform** dropdown to **All Platforms**.
82+
83+
1. Open the **Configuration Properties** > **C/C++** > **Output Files** property page.
84+
85+
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.
86+
87+
Alternatively, you can specify the `/ifcMap` switch with a right-click on the project name in the **Solution Explorer** > **Configuration Properties** > **C/C++** > **Command Line**.
88+
89+
## See also
90+
91+
[Overview of modules in C++](../../cpp/modules-cpp.md)\
92+
[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/)

docs/build/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,8 @@ items:
620620
href: ../build/reference/i-additional-include-directories.md
621621
- name: /ifcOutput (Specify where the compiled `.ifc` should go.)
622622
href: ../build/reference/ifc-output.md
623+
- name: /ifcMap (Map named modules and header units to IFC files.)
624+
href: ../build/reference/ifc-map.md
623625
- name: /interface (Treat input file as a module interface unit)
624626
href: ../build/reference/interface.md
625627
- name: /internalPartition (Treat the input file as an internal partition unit.)

docs/error-messages/compiler-errors-2/compiler-errors-c7500-through-c7999.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
description: "Learn more about: Compiler errors C7500 through C7999"
33
title: "Compiler errors C7500 through C7999"
4-
ms.date: 04/18/2021
5-
f1_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7700", "C7701", "C7702", "C7703", "C7704"]
6-
helpviewer_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7700", "C7701", "C7702", "C7703", "C7704"]
4+
ms.date: 10/13/2023
5+
f1_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7696", "C7700", "C7701", "C7702", "C7703", "C7704"]
6+
helpviewer_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7696", "C7700", "C7701", "C7702", "C7703", "C7704"]
77
---
88
# Compiler errors C7500 through C7999
99

@@ -178,6 +178,7 @@ The articles in this section of the documentation explain a subset of the error
178178
| Compiler error C7661 | header-name '%s' has an ambiguous resolution to header '%s' |
179179
| Compiler error C7662 | '%$S': a coroutine cannot be constexpr or consteval |
180180
| [Compiler error C7688](compiler-error-c7688.md) | '`#pragma omp atomic`': expected an expression of scalar type |
181+
| Compiler error C7686 | TOML parse error |
181182
| Compiler error C7700 | type '%$T' in _Generic association compatible with previous association type '%$T' |
182183
| Compiler error C7701 | default _Generic association previously specified |
183184
| Compiler error C7702 | no compatible type for '%$T' in _Generic association list |

0 commit comments

Comments
 (0)