none
Clang compilation error RRS feed

  • Question

  • Hi,

    I am trying to build a cross platform project using visual studio 2015 update1(clang 3.7 toolset). I am getting following compilation error. Please help!

    1>  In file included from C:\SDL2-2.0.4\include\SDL.h:38:
    1>  In file included from C:\SDL2-2.0.4\include/SDL_cpuinfo.h:36:
    1>  In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\intrin.h:35:
    1>  In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\x86intrin.h:30:
    1>  In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\immintrin.h:29:
    1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\mmintrin.h(100,40): error : passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values)
    1>      return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
    1>                                         ^~~~~~~~~~~
    1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\mmintrin.h(118,43): error : passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values)
    1>      return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
    1>                                            ^~~~~~~~~~~~
    1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\mmintrin.h(124,43): error : passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values)
    1>      return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
    1>                                            ^~~~~~~~~~~~
    1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\mmintrin.h(130,43): error : passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values)
    1>      return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
    1>                                            ^~~~~~~~~~~~
    1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Clang 3.7\include\mmintrin.h(136,44): error : passing '__v8qi' (aka 'char') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char' (vector of 8 'char' values)
    1>      return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);


    • Edited by Wcfus Tuesday, March 15, 2016 12:05 AM
    Tuesday, March 15, 2016 12:02 AM

Answers

  • Hi Wcfus,

    I am trying to build a cross platform project using visual studio 2015 update1(clang 3.7 toolset). I am getting following compilation error.

    First of all, you should create a clean and sample project to make sure the code of project is completely right. Then, as the clang is not a Microsoft product, you should use other Platform Toolsets to make sure whether this similar problem is only related to clang. If it just occurs with clang, you could post your issue to the right forum for better support, or you could update it to the latest version. In my opinion, it seems this error is more related to the Clang itself, you could also uninstall it and then install in the newest one to try solving it.

    If this similar issue occurs with all Platform Toolsets, maybe it’s related to the VS, you could try to run the VS as administrator and then reset all the VS settings. For more things about VS issues, you’d post your issues here for better help.

    If this issue is related to your code, you could debug the code to try solving it. Or, you could share the code.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 16, 2016 1:33 AM