1

I'm trying to set up the direct2d with direct3d device as Windows developer center tells me to. How to create a Direct2D device context for rendering

At first I have to create a Direct3D Device. Done! The next step is to get IDXGIDevice with QueryInterface() called on ID3D11Device. And that's a problem. I need to specify the IID for IDXGIDevice interface, but the symbol _IID_IDXGIDevice is unresolved. As I'm targeting the pure C, the __uuidof is not the option.

So, what should I do?

Lionishy
  • 188
  • 1
  • 2
  • 10
  • 3
    With such error (which is similar to [this one](http://stackoverflow.com/questions/5966042/error-lnk2001-unresolved-external-symbol-iid-idirectdraw2), for example) you are supposed to link some additional library to satisfy linker. In your case it's dxguid.lib. – Roman R. Jan 20 '17 at 21:11
  • @RomanR. Yes, it is! You're the best! – Lionishy Jan 20 '17 at 21:37
  • As mentioned [here](https://github.com/microsoft/DirectX-Graphics-Samples/issues/567#issuecomment-525846757), this case is by design, and @RomanR.'s comment is correct. – stanleyerror Mar 13 '22 at 03:12

0 Answers0