LNK1104 与 NuGet 包:DirectXTKAudioWin8.lib
LNK1104 with NuGet Packages : DirectXTKAudioWin8.lib
我有一个 Direct3D 应用程序。
我们使用 NuGet 包 directxtk_desktop_2015
。
在 directxtk_desktop_win10
或 directxtk_uwp
等最近的软件包中,我有额外的 WICTextureLoader
标志,我想要和需要这些标志。
但是,当我将这些包添加到 NuGet 时,我收到链接器错误
LINK : fatal error LNK1104: cannot open file 'DirectXTKAudioWin8.lib'
我该如何解决这个问题?
这是我目前的 packages.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="directxtk_desktop_win10" version="2020.8.15.1" targetFramework="native" />
</packages>
您一次只能使用这些软件包中的 一个。如果您当前使用的是 directxtk_desktop_2015
而您使用的是 VS 2019,那么您应该改用 directxtk_desktop_2017
。
I dropped VS 2015 support and deprecated directxtk_desktop_2015
starting with the February 2020 release
directxtk_desktop_2015
软件包仅包含 Windows 8+ 版本的 DirectX 音频工具包,但是 directxtk_desktop_2017
我切换到使用支持 Windows 7 SP1 或更高版本的 XAudio2Redist。如果您只需要 Windows 10 或更高版本的支持,请改用 directxtk_desktop_win10
。对于 UWP 应用程序(即非 Win32 桌面应用程序),您将使用 directxtk_uwp
.
有关详细信息,请参阅 wiki。
更新:在这种情况下,问题是 .vcxproj
没有完全清理以删除对 directxtk_desktop_2015
的引用。在文本编辑器中打开 vcxproj
并验证引用了哪些 targets
发现了这个问题。
我有一个 Direct3D 应用程序。
我们使用 NuGet 包 directxtk_desktop_2015
。
在 directxtk_desktop_win10
或 directxtk_uwp
等最近的软件包中,我有额外的 WICTextureLoader
标志,我想要和需要这些标志。
但是,当我将这些包添加到 NuGet 时,我收到链接器错误
LINK : fatal error LNK1104: cannot open file 'DirectXTKAudioWin8.lib'
我该如何解决这个问题? 这是我目前的 packages.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="directxtk_desktop_win10" version="2020.8.15.1" targetFramework="native" />
</packages>
您一次只能使用这些软件包中的 一个。如果您当前使用的是 directxtk_desktop_2015
而您使用的是 VS 2019,那么您应该改用 directxtk_desktop_2017
。
I dropped VS 2015 support and deprecated
directxtk_desktop_2015
starting with the February 2020 release
directxtk_desktop_2015
软件包仅包含 Windows 8+ 版本的 DirectX 音频工具包,但是 directxtk_desktop_2017
我切换到使用支持 Windows 7 SP1 或更高版本的 XAudio2Redist。如果您只需要 Windows 10 或更高版本的支持,请改用 directxtk_desktop_win10
。对于 UWP 应用程序(即非 Win32 桌面应用程序),您将使用 directxtk_uwp
.
有关详细信息,请参阅 wiki。
更新:在这种情况下,问题是 .vcxproj
没有完全清理以删除对 directxtk_desktop_2015
的引用。在文本编辑器中打开 vcxproj
并验证引用了哪些 targets
发现了这个问题。