unresolved external symbol _WKPDID_D3DDebugObjectName

Nov 23, 2012 at 3:02 AM
Edited Nov 23, 2012 at 6:49 AM

When I add the tool kit as a New Reference to my DirectX Component of my C#/XAML project, I get the following errors. Shouldn't the toolkit work off the shelf? Did I miss an include file? _WKPDID_D3DDebugObjectName comes from D3Dcommon.h, but this file isn't included anywhere in the project.

I'm using tool kit from Nov 15. I don't remember having this problem from the previous toolkit.

I also don't get this error when I take the DirectXTK project from the sample project, "Direct3D with XAML Marble Maze" and drop it into my project.

Then this problem occurred again when I included BasicLoader.h to load a .dds texture in the CubeRenderer.cpp (the default file when creating a new C# XAML with DirectX project).


Error	1	error LNK2001: unresolved external symbol _WKPDID_D3DDebugObjectName	F:\src\WindowsPhone\GameWp8Dx\GameWp8Dx\GameWp8DxComponent\DirectXTK.lib(GeometricPrimitive.obj)	GameWp8DxComponent
Error	2	error LNK2001: unresolved external symbol _WKPDID_D3DDebugObjectName	F:\src\WindowsPhone\GameWp8Dx\GameWp8Dx\GameWp8DxComponent\DirectXTK.lib(BasicEffect.obj)	GameWp8DxComponent
Error	3	error LNK2001: unresolved external symbol _WKPDID_D3DDebugObjectName	F:\src\WindowsPhone\GameWp8Dx\GameWp8Dx\GameWp8DxComponent\DirectXTK.lib(CommonStates.obj)	GameWp8DxComponent
Error	4	error LNK2001: unresolved external symbol _WKPDID_D3DDebugObjectName	F:\src\WindowsPhone\GameWp8Dx\GameWp8Dx\GameWp8DxComponent\DirectXTK.lib(EffectCommon.obj)	GameWp8DxComponent
Nov 23, 2012 at 6:01 PM

WKPDID_D3DDebugObjectName is defined in dxguid.lib.  You need to link with that library.

Nov 24, 2012 at 12:25 AM
Edited Nov 24, 2012 at 12:27 AM

Note you really only need dxguid for this for your "Debug" build, but it's probably safer to link to DXGUID.LIB for all configurations.

We'll look at adding a #pragma comment(lib,"dxguid.lib") statement in the right places to make this automatic (unless you are using /NODEFAULTLIB of course).

PS: Actually there's nothing particular special about DXGUID.LIB. It's just a convient way to get common DirectX GUIDs defined for your project. You can also have a single .cpp file in your application build with #define INITGUID. The same is true of uuid.lib