0

i'm currently trying to create some basic's with DirectX, but i'm currently stuck because i cant seem to find the external symbol "CreateDXGIFactory2".

I've included the lib "dxgi.lib" but it cant find the external symbol. I've also looked in the lib itself and it's not inside there.

...I'm missing a external symbol for some reason:

Error LNK2001 unresolved external symbol CreateDXGIFactory2 ConsoleApplication2

Does anyone know in which lib i have to link?

Roman R.
  • 68,205
  • 6
  • 94
  • 158
J. Doe
  • 1
  • 1
  • 1
    please provide example code and the exact error that you get. – Jon Scott Oct 27 '17 at 22:47
  • I would say example code is pretty useless in that case because i'm missing a external symbol for some reason. ` Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol CreateDXGIFactory2 ConsoleApplication2 c:\Users\Me\source\repos\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj 1` – J. Doe Oct 27 '17 at 22:49

1 Answers1

1

You are probably using the legacy DirectX SDK for your copy of dxgi.lib which would not have this import which was introduced in the Windows 8.1 SDK.

CreateDXGIFactory2 is not supported on Windows 7 or Windows 8.0. See DXGI Debug Device

Visual Studio 2013 or later already comes with the newer Windows 8.1 SDK or Windows 10 SDK that would have the proper version of dxgi.lib. If you need to use the legacy DirectX SDK to get deprecated bits like D3DX9, D3DX10, etc. then you need to use the proper (and reversed) include/lib path order than was used for VS 2010 in order to mix the Windows SDK and the legacy DirectX SDK.

See Where is the DirectX SDK (2015 Edition)?, The Zombie DirectX SDK, and Living without D3DX

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81