Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 2.42 KB

compiler-options.md

File metadata and controls

54 lines (36 loc) · 2.42 KB
title ms.custom ms.date ms.technology ms.topic dev_langs helpviewer_keywords ms.assetid author ms.author ms.workload
Compiler Options | Microsoft Docs
01/29/2018
cpp-tools
reference
C++
cl.exe compiler
x86 Visual C++ compiler
ARM Visual C++ compiler
compiler options, C++
x64 Visual C++ compiler
ed3376c8-bef4-4c9a-80e9-3b5da232644c
corob-msft
corob
cplusplus

Compiler Options

cl.exe is a tool that controls the Microsoft Visual C++ (MSVC) C and C++ compilers and linker. cl.exe can be run only on operating systems that support Microsoft Visual Studio for Windows.

Note

You can start this tool only from a Visual Studio developer command prompt. You cannot start it from a system command prompt or from File Explorer. For more information, see Build C/C++ code on the command line.

The compilers produce Common Object File Format (COFF) object (.obj) files. The linker produces executable (.exe) files or dynamic-link libraries (DLLs).

Note that all compiler options are case sensitive. You may use either a forward slash (/) or a dash (-) to specify a compiler option.

To compile without linking, use the /c option.

Find a compiler option

To find a particular compiler option, see one of the following lists:

Specify compiler options

The topic for each compiler option discusses how it can be set in the development environment. For information on specifying options outside the development environment, see:

Related build tools

Linker options also affect how your program is built.

See also

C/C++ Building Reference
Setting Compiler Options
Fast Compilation
CL Invokes the Linker