microsoft / DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
https://walbourn.github.io/directxtk/
MIT License
2.57k stars 511 forks source link

AsyncStatus ambiguous symbol when using DirectXTK with "DirectX 11 and XAML app" template #52

Closed johanlindfors closed 8 years ago

johanlindfors commented 8 years ago

Installing the latest version of DirectXTK from Nuget (2016.8.4.1) into a project based on the "DirectX 11 and XAML app" Visual Studio template is causing build errors since AsyncState is an ambiguous symbol.

Well honestly, it only breaks when I add an include of SimpleMath.h in the pch.h.

But this worked earlier, any ideas on how to solve easiest?

This is on Windows 10 Anniversary Update, with Visual Studio 2015 Update 2

johanlindfors commented 8 years ago

If I add #define DIRECTX_NO_WFRECT before any references of including SimpleMath.h the build works, but is that as planned or am I missing something else?

walbourn commented 8 years ago

It seems Windows.Foundation.h conflicts with XAML headers. Maybe I'll make the ABI::Windows::Foundation::Rect interop opt-in rather than opt-out because the Windows::Foundation::Rect interop works fine without the #include that conflicts. Really the ABI interop may just be more trouble that it's worth.

walbourn commented 8 years ago

Just removed the ABI::Windows::Foundation::Rect, so we don't need the #Include at all.