Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, previously on other computers I have installed Visual Studio, and the installs give the developer console options, and I build from the developer console, for a quick build. Now that I install Visual Studio on another computer, it doesn't allow me due to slow internet speed, so I decided to install only the windows10 SDK, from an executable, once installed it shows these installed applications,

GPUView.exe
gflags.exe
windbg.exe
appcertui.exe
appverif.exe
windows kits

But CMD from developers has not been installed, as I do to compile C code, but without using Visual Studio, nor using GCC compiler, since gcc compiler lacks some headers.


What I have tried:

C:\Program Files (x86)\Windows Kits\10\bin

But CMD from developers has not been installed, as I do to compile C code, but without using Visual Studio, nor using GCC compiler, since gcc compiler lacks some headers.
I have checked this directory and I can't find the executable CL.exe compiler, since this is the compiler that Visual Studio for C installs, and I don't install the SDK separately.
Posted
Updated 10-Feb-23 0:02am

You need to install the compiler,linker and associated run time libraries in order to do this. Take a look at the section titled "Build Tools for Visual Studio 2022" at Download Visual Studio Tools - Install Free for Windows, Mac, Linux[^]. I have not tried this myself, but the comments at Configure Visual Studio Code for Microsoft C++[^] suggest it could be what you need.
 
Share this answer
 
You need MSBuild for building applications, even Visual Studio uses MSBuild for compiling applications.

However, MSBuild is a simpler way of compiling applications avoiding compiling and linking hassles because it hides these complexities. However internally MSBuild does need a compiler and linker installed on the machine you like to build on.

the error you are getting regarding cl.exe is not found because its not in your path settings, since you have installed Windows SDK that contains build tools including cl.exe, you should check the Windows SDK folder for cl.exe. Once you found that file all you need to do is to add the path in the environment variable and now you should be able to compile your c code easily. If you are not able to find cl.exe then you need to download Visual C++ Build Tools which do contain cl.exe

Following Link MSBuild - MSBuild | Microsoft Learn[^] will give you precise steps to install MSBuild on envirnment that do not have Visual Studio.

You will find tons of articles with samples if you google "MSBuild"
 
Share this answer
 
v2
Comments
Richard MacCutchan 10-Feb-23 5:56am    
That is not correct, msbuild has nothing to do with the compiler/linker. I build applications by compiling and linking from the command line.
_Asif_ 10-Feb-23 10:56am    
The updated solution, thanks anyway. I re-read the question and got what you meant. Thanks anyway

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900