c++sdkdirectxdirectx-12lnk2001

DirectX 12 SDK LNK2001


I keep getting this link error:

error LNK2001: unresolved external symbol D3D12SerializeRootSignature

even though i have the SDK linked and added to C/C++ and VC++


Solution

  • I use this line...

    #pragma comment(lib,"d3d12.lib")
    

    … in the include file to make sure that the d3d12.lib is visible to the linker.