How to install LLVM?

Asked

Viewed 351 times

0

How to install the Clang/LLVM in windows to run C programs in bash always appears "failed to find msbuilt toolsets" when installing llvm??

1 answer

1

You can download the installers for windows on: http://releases.llvm.org/download.html

In this case there are two versions:

For more recent versions visit the cited link at the beginning

Note that at the time of installation the following screen will appear:

llvm instalação

Select how I left in the example, you can switch to All Users if desired, the icon on the desktop is optional, but for ease you can leave it there.

Note: You’ll probably have to install the http://landinghub.visualstudio.com/visual-cpp-build-tools, if not already installed.


Once installed to test only, create a file in the folder you want with name hello.c, then add this 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

So type this and hit Enter:

clang hello.c -o hello.exe

Then in the CMD type this:

hello.exe

If all goes well the text will appear:

Stack Overflow

Sample test on my computer:

hello world com clang

Browser other questions tagged

You are not signed in. Login or sign up in order to post.