[cfe-dev] DirectXMath with Clang-cl

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Mon Apr 10 09:42:06 PDT 2017


This is https://bugs.llvm.org//show_bug.cgi?id=28250

On Sun, Apr 9, 2017 at 11:21 PM, via cfe-dev <cfe-dev at lists.llvm.org> wrote:

> Hello Clang-World,
>
> I tried to compile a simple DirectXMath-Programm with the new clang-cl.
> int main(int argc, char **argv)
> {
>         DirectX::XMVECTOR data{120.0f, 240.0f};
>
>         data = DirectX::XMVectorMultiply(data, DirectX::XMVECTOR{2.0f,
> 3.6f});
>
>         printf("Result: {%f, %f}\n", DirectX::XMVectorGetX(data),
> DirectX::XMVectorGetY(data));
>         system("PAUSE");
>
>         return 0;
> }
>
> But the compiler fails with >20 Errors, like:
> "1>  In file included from main.cpp:1:
> 1>  In file included from C:\Program Files (x86)\Windows
> Kits\8.1\Include\um\DirectXMath.h:1884:
> 1>C:\Program Files (x86)\Windows Kits\8.1\Include\um/DirectXMathVector.inl(412,13):
> error : member reference base type 'DirectX::FXMVECTOR' (aka 'const
> __m128') is not a structure or union
> 1>      return V.m128_f32[i];"
>
> I know, that windows defines __m128 in a different way than clang, but is
> there no way to use DirectXMath or DirectX with Clang? Will there one day a
> way to do so?
>
> Kind regards
> Björn
> Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816,
> USt.ID-Nr. DE 114 165 789
> Geschäftsführer: Hiroshi Kawamura, Dr Hiroshi Nakamura, Markus Bode, Heiko
> Lampert, Takashi Nagano, Takeshi Fukushima.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170410/74a30a9c/attachment.html>


More information about the cfe-dev mailing list