2

A while ago I asked about running Clang on the command line in Windows, but was unable to get any useful information. Now I see that the ClangOnWin project at SourceForge offers binaries for Windows. That's looks promising, but I've never heard of ClangOnWin and there don't seem to be many mentions of it on the Net. I'm reluctant to run a downloaded executable that has no reputation. (If I were set up to install and run it in a VM, I would, but I'm not.)

Does anybody have any experience with ClangOnWin? The current distribution is named LLVM-3.5svn-win32-198200.exe, which suggests that it's Clang 3.5, and that's exciting, because Clang 3.5 is compliant with the current draft of C++14 (per http://clang.llvm.org/cxx_status.html) .

Community
  • 1
  • 1
KnowItAllWannabe
  • 12,972
  • 8
  • 50
  • 91
  • Never heard of it either. Seems to be some random guy doing Windows builds of Clang, but it's definitely not something official. – Sebastian Redl Jan 27 '14 at 18:47

1 Answers1

4

Existence of official clang windows builds is really well hidden.

From: http://blog.llvm.org/2013/09/a-path-forward-for-llvm-toolchain-on.html

[..] We’re launching an alpha-build website as part of llvm.org where you can get fresh builds of Clang, various Clang-based-tools, LLD, and the rest of the LLVM toolchain for Windows on a regular basis. [..]

Now on "LLVM Snapshot Builds" page Ctrl+F for "Windows snapshot builds". There is a link to latest installer.

Now looking at the url of download link we can discover older versions of installers can be found in: http://llvm.org/builds/downloads/


(update #1)

Based on information found in ..:

.. I created huge .7z file containing most of 32-bit packages and libraries.

And then discovered, that using: https://sourceforge.net/projects/s-zipsfxbuilder/ .7z archive can be converted to .exe(-cutable extractor).

Just couldn't resist.


(update #2)

From: https://github.com/iljau/msys2_zipped/releases/tag/v0.5

  1. Download msys32-setup.exe (894 MB).

  2. Let it run.

  3. Launch ~/msys2/mingw32_shell.bat

    $ clang++ --version
    clang version 3.4 (tags/RELEASE_34/final)
    Target: i686-w64-mingw32
    Thread model: posix

I got my hello_world.cpp compiled. It didn't print anything, though. ;-D

But good for a start.

iljau
  • 2,151
  • 3
  • 22
  • 45
  • I believe this is the link I used in my [earlier post about Clang on Windows](http://stackoverflow.com/questions/18711595/how-run-clang-from-command-line-on-windows). I wasn't able to get that to work, and my sense is that others' experiences were the same. Hence my continuing search for a Clang binary for Windows that "just works". – KnowItAllWannabe Jan 27 '14 at 19:50
  • @KnowItAllWannabe you may want to check out [MinGW-builds](http://sourceforge.net/projects/mingwbuilds/). It installs latest versions of `gcc/g++` (currently `4.8.1`). It's not `clang`, but at least "just works" part of your wish is satisfied. – iljau Jan 27 '14 at 20:07
  • I already have g++ 4.8.1 and the latest Microsoft CTP installed. But Clang has better error messages, and it's implemented some features that these compilers have not, so I'd really like to add Clang. – KnowItAllWannabe Jan 27 '14 at 20:31