Quantcast

DirectXMath with Clang-cl

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

DirectXMath with Clang-cl

Daniel Marjamäki via cfe-dev
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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DirectXMath with Clang-cl

Daniel Marjamäki via cfe-dev

On Sun, Apr 9, 2017 at 11:21 PM, via cfe-dev <[hidden email]> 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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...