Terminology: Is "CL" identical to "the MSVC compiler"
Asked Answered
H

1

7

I am having a hard time to make out whether the command line tool cl.exe is what people refer to when they are talking about "the MSVC compiler".

Are the two the same thing or do you use cl to control the compiler?

Hammerlock answered 18/12, 2018 at 12:39 Comment(3)
Sounds to me like a distinction without a difference. You type cl mysource.cpp on the command line - does it really matter whether cl is doing all the work, or delegates some or all of it to other binaries? Anyway, there are, in fact, a bunch of DLLs and EXEs involved.Leverrier
The point is that I don't know whether cl IS MSCV or not. In other words is there something like an MSVC executable (that I can't find on my system)? If so, how is it different from the cl executable?Hammerlock
Well, there's Visual Studio IDE, housed in devenv.exe. The command-line C++ compiler shipped with Microsoft Visual C++ (MSVC) product is indeed named cl.exe (at least, that's the entry point; it invokes a bunch of other tools).Leverrier
D
0

Yes, when people refer to the "MSVC compiler," they mean "cl". "cl" is the tool that controls the Microsoft Visual C and C++ compilers and linker. It invokes other tools.

Also, when people mention "VC17", they are referring to "cl" from "Visual Studio 17 2022".

Similarly, "VC16" refers to "cl" from "Visual Studio 16 2019".

Finally, there is "clang-cl," which is the entry point for the Microsoft-compatible version of the Clang/Clang++ compilers from the LLVM project. This is often refered to as "Microsoft clang".

Decision answered 20/7, 2024 at 15:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.