将 IID_IDXGIDevice 传递到 IUnknown::QueryDevice 时出现 DXGI 链接器错误
我试图在渲染框架中将交换链和窗口创建与 D3D10 设备创建分开,这意味着我无法真正使用 D3D10CreateDeviceAndSwapChain。在尝试构建我的测试应用程序时,我遇到了意外的链接器错误。
我包括 DXGI.h 并链接到 DXGI.lib 以及 D3D10 库,但仅此而已。
问题代码如下:
IDXGIDevice* pDXGIDevice = NULL;
if(FAILED(hr = pDXGIFactory->QueryInterface(IID_IDXGIDevice, reinterpret_cast(&pDXGIDevice)))) 返回小时;
我收到的链接器错误与 _IID_IDXGIDevice 是未解析的外部符号有关,但我找不到有关我应该链接到的其他库的信息。任何建议将不胜感激。
我使用的是 Win7 x64、VS2008 和最新版本的 DirectX SDK。
I am trying to separate Swapchain and Window creation from D3D10 device creation in my rendering framework meaning that I can't really use D3D10CreateDeviceAndSwapChain. I am running into an unexpected linker error when trying to build my test app.
I am including DXGI.h and linking to DXGI.lib as well as D3D10 libraries but nothing else.
The problem code is as follows:
IDXGIDevice* pDXGIDevice = NULL;
if(FAILED(hr = pDXGIFactory->QueryInterface(IID_IDXGIDevice, reinterpret_cast(&pDXGIDevice))))
return hr;
The linker error I get relates to _IID_IDXGIDevice being an unresolved external symbol but I can't find info on what additional library I should be linking to. Any suggestions would be appreciated.
I am using Win7 x64, VS2008 and the most up to date version of the DirectX SDK.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用 __uuidof(IDXGIDevice) 即可。
Just use __uuidof(IDXGIDevice) instead.