How do I install clang / LLVM on windows to run C programs in bash if it ever appears "failed to find msbuilt toolsets" when installing llvm ??
How do I install clang / LLVM on windows to run C programs in bash if it ever appears "failed to find msbuilt toolsets" when installing llvm ??
You can download the installers for windows at: link
In this case there are two versions:
For more recent versions access the link quoted at the beginning
Note that at the time of installation the following screen will appear:
SelectasIleftintheexample,youcanswitchtoAllUsersifyouwish,theicononthedesktopisoptional,butforeaseyoucanleaveitthere.
Note:Youprobablyhavetoinstallthe link , if you have not yet installed.
Once installed to test only, create a file in the folder you want named hello.c
, then add it to it:
#include <stdio.h>
int main()
{
printf("Stack Overflow");
return 0;
}
Then via CMD or PowerShell navigate to the folder, something like:
cd c:\pasta\aonde\salvei\meu\programa
Then type this and press Enter:
clang hello.c -o hello.exe
Then in the CMD enter this:
hello.exe
If all goes well the text will appear:
Stack Overflow
Sample test on my computer: