Skip to content

Commit a8c852f

Browse files
authored
Merge pull request MicrosoftDocs#100 from MicrosoftDocs/corob-msft-patch-3
Update cl-environment-variables.md
2 parents 85695ff + 4cb5c46 commit a8c852f

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

docs/build/reference/cl-environment-variables.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,56 +17,59 @@ ms.author: "corob"
1717
manager: "ghogen"
1818
---
1919
# CL Environment Variables
20+
2021
The CL tool uses the following environment variables:
2122

22-
- CL and _CL\_, if defined. The CL tool prepends the options and arguments defined in the CL environment variable to the command line arguments, and appends the options and arguments defined in _CL\_, before processing.
23+
- CL and \_CL\_, if defined. The CL tool inserts the options and arguments defined in the CL environment variable at the beginning of the command line arguments, and adds the options and arguments defined in \_CL\_ to the end of the command line arguments, before processing.
2324

24-
- INCLUDE, which must point to the \include subdirectory of your Visual C++ installation.
25+
- INCLUDE, which must point to the \include subdirectory of your Visual C++ installation.
2526

26-
- LIBPATH, which specifies directories to search for metadata files referenced with [#using](../../preprocessor/hash-using-directive-cpp.md). See `#using` for more information on LIBPATH.
27+
- LIBPATH, which specifies directories to search for metadata files referenced by a `#using` directive. See [#using](../../preprocessor/hash-using-directive-cpp.md) for more information on LIBPATH.
2728

28-
You can set the CL or _CL\_ environment variable using the following syntax:
29+
You can set the CL or \_CL\_ environment variables using the following syntax:
2930

3031
```
3132
SET CL=[ [option] ... [file] ...] [/link link-opt ...]
3233
SET _CL_=[ [option] ... [file] ...] [/link link-opt ...]
3334
```
3435

35-
For details on the arguments to the CL and _CL\_ environment variables, see [Compiler Command-Line Syntax](../../build/reference/compiler-command-line-syntax.md).
36+
For details on the arguments to the CL and \_CL\_ environment variables, see [Compiler Command-Line Syntax](../../build/reference/compiler-command-line-syntax.md).
3637

37-
You can use these environment variables to define the files and options you use most often and use the command line to define specific files and options for specific purposes. The CL and _CL\_ environment variables are limited to 1024 characters (the command-line input limit).
38+
You can use these environment variables to define the files and options you use most often and use the command line to define specific files and options for specific purposes. The CL and \_CL\_ environment variables are limited to 1024 characters (the command-line input limit).
3839

39-
You cannot use the /D option to define a symbol that uses an equal sign (=). You can substitute the number sign (#) for an equal sign. In this way, you can use the CL or _CL_environment variables to define preprocessor constants with explicit valuesfor example, `/DDEBUG#1` to define `DEBUG=1`.
40+
You cannot use the /D option to define a symbol that uses an equal sign (=). You can substitute the number sign (#) for an equal sign. In this way, you can use the CL or \_CL\_ environment variables to define preprocessor constants with explicit values; for example, `/DDEBUG#1` to define `DEBUG=1`.
4041

41-
For related information, see [Set Environment Variables](../../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
42+
For related information, see [Set Environment Variables](../../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
4243

43-
## Examples
44-
The following is an example of setting the CL environment variable:
44+
## Examples
45+
46+
The following is an example of setting the CL environment variable:
4547

4648
```
4749
SET CL=/Zp2 /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ
4850
```
4951

50-
When this environment variable is set, if you enter `CL INPUT.C` at the command line, this is the effective command:
52+
When this environment variable is set, if you enter `CL INPUT.C` at the command line, this is the effective command:
5153

5254
```
5355
CL /Zp2 /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ INPUT.C
5456
```
5557

56-
The following example causes a plain CL command to compile the source files FILE1.c and FILE2.c, and then link the object files FILE1.obj, FILE2.obj, and FILE3.obj:
58+
The following example causes a plain CL command to compile the source files FILE1.c and FILE2.c, and then link the object files FILE1.obj, FILE2.obj, and FILE3.obj:
5759

5860
```
5961
SET CL=FILE1.C FILE2.C
6062
SET _CL_=FILE3.OBJ
6163
CL
6264
```
6365

64-
This has the same effect as the following command line:
66+
This has the same effect as the following command line:
6567

6668
```
6769
CL FILE1.C FILE2.C FILE3.OBJ
6870
```
6971

70-
## See Also
71-
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)
72-
[Compiler Options](../../build/reference/compiler-options.md)
72+
## See Also
73+
74+
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)
75+
[Compiler Options](../../build/reference/compiler-options.md)

0 commit comments

Comments
 (0)