I followed the instructions http://clang.llvm.org/get_started.html
I compiled the last line of llvm and clang with MSVC 2010. Now I can compile simple programs with Clang, but when I tried to compile this program, I got a lot of errors. Here is the program:
#include <algorithm> int main(){ return 0; }
And here are some of the errors:
In file included from hello.cpp:1: In file included from C:\Program Files\Microsoft Visual Studio 10.0\VC\include\algorithm:6: In file included from C:\Program Files\Microsoft Visual Studio 10.0\VC\include\memory:987: In file included from C:\Program Files\Microsoft Visual Studio 10.0\VC\include\intrin.h:24: In file included from H:/LLVM/build/bin/Debug/../lib/clang/3.3/include\immintrin.h:32: In file included from H:/LLVM/build/bin/Debug/../lib/clang/3.3/include\xmmintrin.h:988: H:/LLVM/build/bin/Debug/../lib/clang/3.3/include\emmintrin.h:1384:22: error: expected expression return (__m128)__in; ^ H:/LLVM/build/bin/Debug/../lib/clang/3.3/include\emmintrin.h:1390:23: error: expected expression return (__m128i)__in; ^ H:/LLVM/build/bin/Debug/../lib/clang/3.3/include\emmintrin.h:1396:23: error: expected expression return (__m128d)__in; ^
Full output from Clang: http://pastebin.com/qi87K8qr
Clang is trying to use MSVC headers, but it is not working. Maybe I should use lib ++ or libstd ++ instead, but how to do it?
Note I'm not interested in precompiled clang executables
Simon source share