JMU JMU - Department of Computer Science
Help Tools
MS C/C++: The cl Command

1 Syntax

The cl command has the following syntax: Click here for information.

2 Arguments

option An option or switch (see below).
file A file name.
lib A library name.
command-file A file that contains one or more filenames or options.
link-opt One or more linker options (see the description of the link command).

3 Options

The list of valid options/switches for the cl command includes the following:

4 Examples

The following command compiles (but does not link) the source file named test.cpp and creates the file test.cpp:

The following command first defines the symbol DEBUG in test.c and then compiles and links it:

The following command "includes" files from the directory \myfiles\include in addition to the standard INCLUDE directory:

5 Error and Warning Messages

To get a description of an error or warning message, enter the error code below and click on the Find button.

Copyright 2019