Install Microsoft VS Command Line Compiler Only (CL.EXE)

Since Casey no longer uses Visual Studio IDE any more, is there anyway to install the compiler without all the bloat of the IDE? If so.. How could it be done?

Thanks

Edited by Zenn on Reason: Initial post
I think Casey mentioned once that you can get cl.exe directly from the windows 10 SDK.
Not sure if this still holds true for newer versions though.
On the visual studio download page, there is an "all downloads" section. Click the "tools for visual studio 2019" menu, and download "Build tools for visual studio 2019". This will give you an installer similar to the regular VS installer, but it won't install the IDE.
I did not know this hmm... As I'm still using VS 17 on another computer and havn't updated because I do not use the IDE. I will look in to it Thank you
Note that these build tools will still install a lot of "garbage" on your system as dependencies.
SDK will install significantly less stuff.
I thought the windows 10 sdk supplied the windows headers/libs, but not the compiler, but I could be mis-remembering.
Oh, apparently they removed compiler starting with Windows 8 SDK: https://stackoverflow.com/questions/18078755 :(
In Windows 7 times the cl.exe/link.exe & other executables were included in SDK.

I guess Build Tools is the only option now.

Oh... I am running Windows 7 Pro. So all I need is the SDK? 7.0, 7.1 or 8?

See thats the issue I have install Microsoft VS before in the past.. And as long as nothing goes wrong all is fine. There is one time however I had a power cut and on reboot VS did not work right.. But I could never get it to uninstall fully either 'something' was always left behind which effected feature re-installs/settings. At least that is my experience so far.

I have a clean install of widows now. So was looking for a way to put CL.exe on with the libs to follow along using 4coder. with out all the crap as I'll never use the VS IDE.

A friend suggested using minGW or scrap windows and use Ubuntu. But I've never used anything other than dos/windows. So trying to follow along AND learn a new OS is a lot to take in.

Edited by Zenn on
Personally, as someone who still use minGW sometimes because of a project I started in school, I wouldn't recommend starting anything new with it. It would reduce your debugger options (Unless I'm mistaken, RemedyBG can only debug through PDBs?) and I recently had some issues with it, like link-time optimisations that break the build when used.
Clang for Windows might be a better option; some big projects have switched to it because it can generate PDBs, so generated binaries can be debugged using a lot of Windows debuggers.

Switching to Linux is also a valid option :) But it's always harder to learn 2 things at once.
ZennMystic
Oh... I am running Windows 7 Pro. So all I need is the SDK? 7.0, 7.1 or 8?


SDK version has nothing to do with OS you are running.

SDK is providing header files and libraries that your code wants to use it. If you install older SDK version, you won't have access to APIs available in newer Windows versions (unless you declare & load these symbols manually). But that may be OK with you. Then using older SDK version is OK. Just don't expect best compiler there. It will give much older cl.exe/link.exe versions, probably from VS2013 or similar.

Edited by Mārtiņš Možeiko on

I have Windows 11 and am wanting to do the same as the OP. The comments above say Build Tools. Is this still the best option in 2023?

"On the visual studio download page, there is an "all downloads" section. Click the "tools for visual studio 2019" menu, and download "Build tools for visual studio 2019". This will give you an installer similar to the regular VS installer, but it won't install the IDE."

"Oh, apparently they removed compiler starting with Windows 8 SDK: https://stackoverflow.com/questions/18078755 :( In Windows 7 times the cl.exe/link.exe & other executables were included in SDK.

I guess Build Tools is the only option now."

If you want to get MSVC compiler without IDE, then yes - you can install just the Build Tools which will give you cl.exe, link.exe and all related tools, plus SDK headers & libs.


Replying to Mór (#29662)