开发者

Linker error with DXGI when passing IID_IDXGIDevice to IUnknown::QueryDevice

开发者 https://www.devze.com 2022-12-16 19:45 出处:网络
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 unexpect

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 开发者_如何学Cup to date version of the DirectX SDK.


Just use __uuidof(IDXGIDevice) instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号