Visual Studio 2015 doesn't have cl.exe
Asked Answered
P

4

123

I downloaded Visual C++ and Visual Studio, but I cannot find cl.exe to compile my C++ file. The path to the install is `C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin.

Where can I find the compiler to compile C++ code?

Pip answered 11/8, 2015 at 23:40 Comment(4)
Which version of Visual Studio? Did you do a full install?Offhand
The C++ compiler doesn't get installed if you choose the Express Install option. Reinstall and select the Custom Install this time.Candlemas
Ok I will try to reinstall, thank youPip
I had this error when trying to install some package for node.js on Windows, I was getting a node-gyp rebuild error. So I installed Python, then reinstalled VS with C++ option checked, and it worked fine.Kopple
P
236

Visual Studio 2015 doesn't install C++ by default. You have to rerun the setup, select Modify and then check Programming Language -> C++

Progressionist answered 12/8, 2015 at 3:3 Comment(2)
You know you can tick this on under 'Programming Languages' by choosing "Custom" when installing.Leisha
You don't need to re-download the installer for Visual Studio: just go to Add or remove programs -> Visual studio community 2015 -> modify. From there, I clicked languages, Visual C++. Added cl.exe!Illuminism
S
8

In Visual Studio 2019 you can find cl.exe inside

32-BIT : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x86
64-BIT : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64

Before trying to compile either run vcvars32 for 32-Bit compilation or vcvars64 for 64-Bit.

32-BIT : "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
64-BIT : "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"

If you can't find the file or the directory, try going to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC and see if you can find a folder with a version number. If you can't, then you probably haven't installed C++ through the Visual Studio Installation yet.

Saccharo answered 10/7, 2019 at 4:10 Comment(1)
"Microsoft Visual Studio 14.0" is Visual Studio 2015. Also see Microsoft Visual Studio | VS2015 on wikipedia.Karissakarita
A
6

For me that have Visual Studio 2015 this works:
Search this in the start menu: Developer Command Prompt for VS2015 and run the program in the search result.
You can now execute your command in it, for example: cl /?

Alpinist answered 4/5, 2018 at 12:49 Comment(0)
P
0

For first need check is installed cl.exe, open Developer Command Prompt for VS2015 and type "where cl" When its founded on the PC need add $(VC_LibraryPath_x64), $(WindowsSDK_LibraryPath_x64) and $(NETFXKitsDir)Lib\um\x64 to Project->Properties->VC++ Directories

Potomac answered 11/8, 2021 at 19:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.