c++ - 将 IDXGIAdapter1 转换为 IDXGIAdapter4 时出现链接错误 [DirectX 和 WinRT/C++]
问题描述
我正在尝试将 IDXGIAdapter1 实例转换为 IDXGIAdapter4,如下所示:
winrt::com_ptr<IDXGIAdapter1> adapter;
winrt::com_ptr<IDXGIAdapter4> adapter{adapters.front().as<IDXGIAdapter4>()};
但是有链接错误:
错误 LNK2019:函数“public: __cdecl winrt::hresult_error::hresult_error(struct winrt::hresult,struct winrt::hresult_error::from_abi_t)”中引用的未解析外部符号 WINRT_GetRestrictedErrorInfo (??0hresult_error@winrt@@QEAA@Uhresult@ 1@Ufrom_abi_t@01@@Z) 错误 LNK2019:无法解析的外部符号 WINRT_RoOriginateLanguageException 在函数“private: void __cdecl winrt::hresult_error::originate(struct winrt::hresult,void *)”中引用 (?originate@hresult_error@winrt@ @AEAAXUhresult@2@PEAX@Z)
我究竟做错了什么?
解决方案
我通过链接“RuntimeObject.lib”库解决了这个问题。感谢您的帮助,Faywang - MSFT。
推荐阅读
- jenkins - helm install stable/jenkins 失败:PodInitializing
- android - 检查 textview 中整个内容的高度是否大于 textview 的高度
- android - 客户端连接时 Master 停止广告后 Google Nearby API 出现问题
- java - 在日志行之前打印新行,使用 Java 中的日志框架
- python - 如何根据熊猫组合的最高出现率填写值?
- c - 使用 rootfs 进行 GCC 交叉编译
- python - 设计代码数据库应用程序的更新机制
- sql-server - xmlns 的 XML 提取问题
- git - 如何在 Visual Studio 2017 中拉/合并请求?
- jquery - 免费 - jqgrid:结合冻结列、分组标题和工具栏搜索