Mase
Mase

Reputation: 27

Error when I include DirectXTex.h

I get errors when I include DirectXTex.h in my application. I use Visual Studio in Debug 32 bit mode and DirectX11. These is the code:

#include "DirectXTex.h"

Here the errors

How can I fix?

Upvotes: 1

Views: 807

Answers (1)

Chuck Walbourn
Chuck Walbourn

Reputation: 41057

This indicates you have tried to compile the same source file with both XNAMath (a.k.a xboxmath version 2) and DirectXMath (a.k.a. xboxmath version 3). DirectXTex uses DirectXMath, so you probably have #include <xnamath.h> somewhere above #include "DirectXTex.h".

You should update your use of XNAMath to use DirectXMath instead. See 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.

Upvotes: 1

Related Questions