我在编译样本时遇到DirectXTK错误

时间:2017-03-02 05:28:40

标签: xbox-live

我正在尝试构建Xbox Live示例并遇到DirectXTK错误。无论我使用的是创作者程序还是ID @ Xbox样本,都会发生这种情况。这些是https://github.com/Microsoft/xbox-live-samples

的样本

例如,打开Leaderboard示例时,我在解决方案资源管理器中看到“DirectXTK(不可用)”。

尝试构建时,我得到以下输出

1>------ Build started: Project: Leaderboards, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1611,5): warning : The referenced project '..\..\..\..\Kits\DirectXTK\DirectXTK_Windows10.vcxproj' does not exist.
1>  pch.cpp
1>c:\users\rigu\xsapi\github\test\xbox-live-samples\samples\creatorssdk\leaderboards\uwp\cpp\pch.h(32): fatal error C1083: Cannot open include file: 'GamePad.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

关于如何获得样品制作的任何想法运行

1 个答案:

答案 0 :(得分:1)

DirectXTK是Xbox Live示例git repo中的子模块。有两种方法可以确保您获得DirectXTK。

  1. 初次克隆时,请确保使用" - recursive"选项。 IE:

    git clone --recursive https://github.com/Microsoft/xbox-live-samples.git

  2. 如果您已经克隆了samples目录,则可以使用以下命令初始化子模块

    git submodule update --init

    然后您可以使用以下命令更新它们:

    git submodule update