• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1HappyCoder  Members

Posted 22 June 2014 - 01:03 AM

I am working on a DirectX project and I can build and link the project just fine without adding DxErr.lib to the project. When I add the line

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

To include the library, without even referencing it, I get a linking error to D3D11CreateDevice even though that function is defined in d3d11.lib.

Error 1 error LNK2019: unresolved external symbol _D3D11CreateDevice@40 referenced in function "public: __thiscall DX11Graphics::DX11Graphics(void)" (??0DX11Graphics@@QAE@XZ) DX11Graphics.obj DeferredRendering


If I don't include DxErr.lib then it links just fine.

Any thoughts as to why this is happening? This problem has me stumped.

My current game project Platform RPG

### #2HappyCoder  Members

Posted 22 June 2014 - 01:07 AM

So I have been trying to fix this for a few hours now, and it turns out I just needed to include the 32 bit version of DxErr.lib instead of the 64 bit version. I seriously figured that out right after posting this question.

Even though it is working now I would still like to know if anybody has an explanation as to why it would work like that.

My current game project Platform RPG