Skip to content

Commit b3fb9c6

Browse files
authored
Add cmd language for CL and LINK invocations (#5568)
* Add `cmd` language for CL invocations * Add `cmd` language for LINK invocations * Update metadata in 13 topics
1 parent 20ed867 commit b3fb9c6

13 files changed

+44
-57
lines changed

docs/build/reference/c-compile-without-linking.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: /c (Compile Without Linking)"
32
title: "/c (Compile Without Linking)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: /c (Compile Without Linking)"
4+
ms.date: 11/04/2016
55
f1_keywords: ["/c"]
66
helpviewer_keywords: ["suppress link", "cl.exe compiler, compiling without linking", "-c compiler option [C++]", "c compiler option [C++]", "/c compiler option [C++]"]
7-
ms.assetid: 8017fc3d-e5dd-4668-a1f7-3120daa95d20
87
---
98
# /c (Compile Without Linking)
109

@@ -34,13 +33,13 @@ Any internal project created in the development environment uses the **/c** opti
3433

3534
The following command line creates the object files FIRST.obj and SECOND.obj. THIRD.obj is ignored.
3635

37-
```
36+
```cmd
3837
CL /c FIRST.C SECOND.C THIRD.OBJ
3938
```
4039

4140
To create an executable file, you must invoke LINK:
4241

43-
```
42+
```cmd
4443
LINK first.obj second.obj third.obj /OUT:filename.exe
4544
```
4645

docs/build/reference/cl-invokes-the-linker.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
description: "Learn more about: CL Invokes the Linker"
32
title: "CL Invokes the Linker"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: CL Invokes the Linker"
4+
ms.date: 11/04/2016
55
helpviewer_keywords: ["compiling source code [C++], without linking", "invoking linker from the compiler", "LINK tool [C++], invoking from CL compiler", "cl.exe compiler [C++], compiling without linking", "cl.exe compiler [C++], controlling linker"]
6-
ms.assetid: eae47ef7-09eb-40c9-b318-7c714cd452fc
76
---
87
# CL Invokes the Linker
98

@@ -30,7 +29,7 @@ Assume that you are compiling three C source files: MAIN.c, MOD1.c, and MOD2.c.
3029

3130
To build this program, compile with the following command line:
3231

33-
```
32+
```cmd
3433
CL MAIN.c MOD1.C MOD2.C MYGRAPH.lib
3534
```
3635

docs/build/reference/compiler-command-line-syntax.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Command-Line Syntax"
32
title: "MSVC Compiler Command-Line Syntax"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Command-Line Syntax"
4+
ms.date: 11/04/2016
55
helpviewer_keywords: ["syntax, CL compiler command line", "cl.exe compiler, command-line syntax"]
6-
ms.assetid: acba2c1c-0803-4a3a-af25-63e849b930a2
76
---
87
# Compiler Command-Line Syntax
98

109
The CL command line uses the following syntax:
1110

12-
```
11+
```cmd
1312
CL [option...] file... [option | file]... [lib...] [@command-file] [/link link-opt...]
1413
```
1514

docs/build/reference/e-preprocess-to-stdout.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: /E (Preprocess to stdout)"
32
title: "/E (Preprocess to stdout)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: /E (Preprocess to stdout)"
4+
ms.date: 11/04/2016
55
f1_keywords: ["/e"]
66
helpviewer_keywords: ["-E compiler option [C++]", "/E compiler option [C++]", "preprocessor output, copy to stdout", "preprocessor output"]
7-
ms.assetid: ddbb1725-d950-4978-ab2f-30a5cd7b778c
87
---
98
# /E (Preprocess to stdout)
109

@@ -44,7 +43,7 @@ m(int)main( )
4443

4544
However, if you compile with:
4645

47-
```
46+
```cmd
4847
cl -E test.cpp > test2.cpp
4948
```
5049

@@ -66,7 +65,7 @@ cl -E test.cpp > test2.cpp
6665

6766
The following command line preprocesses `ADD.C`, preserves comments, adds `#line` directives, and displays the result on the standard output device:
6867

69-
```
68+
```cmd
7069
CL /E /C ADD.C
7170
```
7271

docs/build/reference/ep-preprocess-to-stdout-without-hash-line-directives.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: /EP (Preprocess to stdout Without #line Directives)"
32
title: "/EP (Preprocess to stdout Without #line Directives)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: /EP (Preprocess to stdout Without #line Directives)"
4+
ms.date: 11/04/2016
55
f1_keywords: ["/ep", "VC.Project.VCCLCompilerTool.GeneratePreprocessedFileNoLines"]
66
helpviewer_keywords: ["copy preprocessor output to stdout", "preprocessor output, copy to stdout", "-EP compiler option [C++]", "EP compiler option [C++]", "/EP compiler option [C++]"]
7-
ms.assetid: 6ec411ae-e33d-4ef5-956e-0054635eabea
87
---
98
# /EP (Preprocess to stdout Without #line Directives)
109

@@ -46,7 +45,7 @@ You cannot use precompiled headers with the **/EP** option.
4645

4746
The following command line preprocesses file `ADD.C`, preserves comments, and displays the result on the standard output device:
4847

49-
```
48+
```cmd
5049
CL /EP /C ADD.C
5150
```
5251

docs/build/reference/fd-program-database-file-name.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: /Fd (Program Database File Name)"
32
title: "/Fd (Program Database File Name)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: /Fd (Program Database File Name)"
4+
ms.date: 11/04/2016
55
f1_keywords: ["/FD", "VC.Project.VCCLWCECompilerTool.ProgramDataBaseFileName", "VC.Project.VCCLCompilerTool.ProgramDataBaseFileName"]
66
helpviewer_keywords: ["/FD compiler option [C++]", "program database file name [C++]", "-FD compiler option [C++]", "PDB files, creating", "program database compiler option [C++]", ".pdb files, creating", "FD compiler option [C++]"]
7-
ms.assetid: 3977a9ed-f0ac-45df-bf06-01cedd2ba85a
87
---
98
# /Fd (Program Database File Name)
109

@@ -42,7 +41,7 @@ This option also names the state (.idb) file used for minimal rebuild and increm
4241

4342
This command line creates a .pdb file named PROG.pdb and an .idb file named PROG.idb:
4443

45-
```
44+
```cmd
4645
CL /DDEBUG /Zi /FdPROG.PDB PROG.CPP
4746
```
4847

docs/build/reference/fe-name-exe-file.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: /Fe (Name EXE File)"
32
title: "/Fe (Name EXE File)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: /Fe (Name EXE File)"
4+
ms.date: 11/04/2016
55
f1_keywords: ["/fe"]
66
helpviewer_keywords: ["-Fe compiler option [C++]", "executable files, renaming", "rename file compiler option [C++]", "/Fe compiler option [C++]", "Fe compiler option [C++]"]
7-
ms.assetid: 49f594fd-5e94-45fe-a1bf-7c9f2abb6437
87
---
98
# /Fe (Name EXE File)
109

@@ -44,13 +43,13 @@ If you specify the [/c (Compile Without Linking)](c-compile-without-linking.md)
4443

4544
The following command line compiles and links all C source files in the current directory. The resulting executable file is named PROCESS.exe and is created in the directory "C:\Users\User Name\repos\My Project\bin".
4645

47-
```
46+
```cmd
4847
CL /Fe"C:\Users\User Name\repos\My Project\bin\PROCESS" *.C
4948
```
5049

5150
The following command line creates an executable file in `C:\BIN` with the same base name as the first source file in the current directory:
5251

53-
```
52+
```cmd
5453
CL /FeC:\BIN\ *.C
5554
```
5655

docs/build/reference/p-preprocess-to-a-file.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: /P (Preprocess to a File)"
32
title: "/P (Preprocess to a File)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: /P (Preprocess to a File)"
4+
ms.date: 11/04/2016
55
f1_keywords: ["VC.Project.VCCLCompilerTool.GeneratePreprocessedFile", "/p", "VC.Project.VCCLWCECompilerTool.GeneratePreprocessedFile"]
66
helpviewer_keywords: ["/P compiler option [C++]", "-P compiler option [C++]", "P compiler option [C++]", "output files, preprocessor", "preprocessing output files"]
7-
ms.assetid: 123ee54f-8219-4a6f-9876-4227023d83fc
87
---
98
# /P (Preprocess to a File)
109

@@ -40,7 +39,7 @@ The **/P** option suppresses compilation. It does not produce an .obj file, even
4039

4140
The following command line preprocesses `ADD.C`, preserves comments, adds `#line` directives, and writes the result to a file, `ADD.I`:
4241

43-
```
42+
```cmd
4443
CL /P /C ADD.C
4544
```
4645

docs/build/reference/specifying-the-pathname.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
description: "Learn more about: Specifying the Pathname"
32
title: "Specifying the Pathname"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Specifying the Pathname"
4+
ms.date: 11/04/2016
55
helpviewer_keywords: ["names [C++], compiler output files", "cl.exe compiler, output files", "output files, specifying pathnames"]
6-
ms.assetid: 7a6595ce-3383-44ae-957a-466bfa29c343
76
---
87
# Specifying the Pathname
98

@@ -24,7 +23,7 @@ Alternatively, the *pathname* argument can be a device name (AUX, CON, PRN, or N
2423

2524
The following command line sends a mapfile to the printer:
2625

27-
```
26+
```cmd
2827
CL /FmPRN HELLO.CPP
2928
```
3029

docs/build/reference/yd-place-debug-information-in-object-file.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: /Yd (Place Debug Information in Object File)"
32
title: "/Yd (Place Debug Information in Object File)"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: /Yd (Place Debug Information in Object File)"
4+
ms.date: 11/04/2016
55
f1_keywords: ["/yd"]
66
helpviewer_keywords: ["/Yd compiler option [C++]", "-Yd compiler option [C++]", "debugging [C++], debug information files", "Yd compiler option [C++]"]
7-
ms.assetid: c5a699fe-65ce-461e-964c-7f5eb2a8320a
87
---
98
# /Yd (Place Debug Information in Object File)
109

@@ -55,13 +54,13 @@ Suppose you have two base files, F.cpp and G.cpp, each containing these **#inclu
5554

5655
The following command creates the precompiled header file ETC.pch and the object file F.obj:
5756

58-
```
57+
```cmd
5958
CL /YcETC.H /Z7 F.CPP
6059
```
6160

6261
The object file F.obj includes type and symbol information for WINDOWS.h and ETC.h (and any other header files they include). Now you can use the precompiled header ETC.pch to compile the source file G.cpp:
6362

64-
```
63+
```cmd
6564
CL /YuETC.H /Z7 G.CPP
6665
```
6766

0 commit comments

Comments
 (0)