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.