0

我在 Windows 7 上的 VS2012 中使用 directx 11 (Windows SDK 8)

我收到了这个错误

1 IntelliSense: more than one instance of overloaded function "XMMatrixTranspose" matches the argument list:
        function "DirectX::XMMatrixTranspose(DirectX::CXMMATRIX M)"
        function "XMMatrixTranspose(DirectX::CXMMATRIX M)"
        argument types are: (const DirectX::XMMATRIX) c:\Program Files (x86)\Windows Kits\8.0\Include\um\DirectXMathMatrix.inl  

我只包含的代码没有什么特别的,#include <DirectXMath.h> 而且任何时候都使用 XMMatrix 方法之一,我得到了这个

有任何想法吗?

谢谢

4

2 回答 2

1

这是因为 Windows 7 包含部分 Windows 8 DirectX 11.1 文件。例如,许多头文件将被包含两次,这将使 Visual Studio 发出一百万条警告。但是,这就是我系统中的全部内容。为什么在 Windows 7 上使用 Windows 8 SDK?只是出于好奇...

我建议只在 Windows 7 上使用 Windows 7 SDK,在 Windows 8 上使用 Windows 8 SDK。

于 2013-04-17T12:28:35.437 回答
0

我在 Windows 7 64 位上使用 Windows 10 SDK 来开发具有新代码模型的 DirectX 11 应用程序。我和OP有同样的问题。

我的解决方案是在调用它们时完全指定 DirectXMath.h 库中的任何方法(例如 DirectX::XMMatrixTranspose)。

示例调用:

m_viewMatrix = DirectX::XMMatrixLookAtLH(position, lookAt, up);
于 2019-01-02T04:59:21.127 回答