views:

53

answers:

1

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.

A: 

Just use __uuidof(IDXGIDevice) instead.

Simon Kozlov