我包含 DirectXTex.h 时出错
Error when I include DirectXTex.h
我在应用程序中包含 DirectXTex.h 时遇到错误。我在调试 32 位模式和 DirectX11 中使用 Visual Studio。这些是代码:
#include "DirectXTex.h"
Here the errors
我该如何解决?
这表示您已尝试使用 XNAMath(a.k.a xboxmath 版本 2)和 DirectXMath(a.k.a.xboxmath 版本 3)编译相同的源文件。 DirectXTex uses DirectXMath,所以你可能在 #include "DirectXTex.h"
.
上方的某处有 #include <xnamath.h>
您应该更新您对 XNAMath 的使用,改为使用 DirectXMath。参见 this blog post and MSDN: Code Migration from the XNA Math Library。
If you are using XNAMath it implies you are also using the legacy DirectX SDK. Make sure you have the paths set up properly (i.e. DXSDK include/lib paths should be listed after the standard include/lib paths in the VC++ Directories property page instead of before).
Also you should read MSDN, Where is the DirectX SDK and Living without D3DX in detail.
我在应用程序中包含 DirectXTex.h 时遇到错误。我在调试 32 位模式和 DirectX11 中使用 Visual Studio。这些是代码:
#include "DirectXTex.h"
Here the errors
我该如何解决?
这表示您已尝试使用 XNAMath(a.k.a xboxmath 版本 2)和 DirectXMath(a.k.a.xboxmath 版本 3)编译相同的源文件。 DirectXTex uses DirectXMath,所以你可能在 #include "DirectXTex.h"
.
#include <xnamath.h>
您应该更新您对 XNAMath 的使用,改为使用 DirectXMath。参见 this blog post and MSDN: Code Migration from the XNA Math Library。
If you are using XNAMath it implies you are also using the legacy DirectX SDK. Make sure you have the paths set up properly (i.e. DXSDK include/lib paths should be listed after the standard include/lib paths in the VC++ Directories property page instead of before).
Also you should read MSDN, Where is the DirectX SDK and Living without D3DX in detail.