|
Boost : |
Subject: Re: [boost] [clang] How to use CLang for Windows?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2013-09-23 18:00:00
On 22 Sep 2013 at 21:26, Daryle Walker wrote:
> There was a recent conference where the Clang team announced a version
> of Clang that's supposed to work on Windows (as opposed to kind-of
> working if you try real hard). It's accessible from the command line if
> you put Clang in the PATH. I just found out it's supposed to be used
> from Visual Studio ('10 or '12) after tweaking a project's settings.
> Can it be used from out BJam system? How will it find right header
> files to use? (Does it automatically use the ones from MSVC?)
I think they meant http://www.ishani.org/web/articles/code/clangvsx/.
It's simply a plugin for Visual Studio, no more. If you want the same
thing with Boost, simply configure a Makefile project in VS and have
it invoke b2 toolset=clang. clang still cannot fully grok the STL
shipped with Visual Studio and therefore uses Mingw's libstdc++ STL,
though I should imagine the Dinkumware in VS2013 is probably the
least customised STL Visual Studio has shipped in many years.
If you are happy to use clang as you would mingw, I've found it
pretty good on Windows. Forget about substituting MSVC with clang
though, they're not equivalent.
If you want a modern C++ 11 compiler on Windows, VS2013 Express is
very good and free. I've been pleasantly surprised at its optimiser
too, I'm seeing a nice speed bump of 15-20% when compiling C++ 11
over VS2012, some of which is STL improvements, some is improved C++
11 rvalue reference support.
Niall
-- Currently unemployed and looking for work. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk