cl [- option...] file... [option | file]... [lib]... [@command-file] [-link link-option...]
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). |
C | Preserves comments during processing. |
c | Compiles without linking. |
Dname[= | # [{string | number}]] | Defines a symbol (as with #define). |
E | Copies preprocessor output to standard output. |
Fnumber | Sets the size of the stack. |
Fefilename | Names the executable file. |
FI | Preprocesses the specified include file. |
Fofilename | Names the object file. |
GX | Enable C++ exception handling. |
help | Provides (some) help. |
I | Searches the given directory for "includes". |
O1 | Creates small code. |
O2 | Creates fast code. |
Zs | Checks syntax only. |
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:
Copyright 2019