0
votes

I am trying to compile old program which works with DirectX 10. Full list of libraries used:

#pragma comment(lib, "d3d10.lib")
#pragma comment(lib, "d3dx10.lib")
#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "dxerr.lib")
#pragma comment( lib, "dxguid.lib" )    

Linker error:

dxerr.lib(dxerrw.obj) : error LNK2019: unresolved external symbol _vsnwprintf referenced in function "long __cdecl StringVPrintfWorkerW(unsigned short *,unsigned __int64,unsigned __int64 *,unsigned short const *,char *)" (?StringVPrintfWorkerW@@YAJPEAG_KPEA_KPEBGPEAD@Z)

1
For people looking for better answers, see this duplicate question: stackoverflow.com/questions/31053670/…leetNightshade

1 Answers

1
votes

Which version of the legacy DirectX SDK are you using? Static libraries* from different versions of the Visual C++ compiler are generally not compatible, so my guess is you are using a DirectX SDK that no longer supports VS 2005--I believe the February 2010 DXSDK was the last one that did as the June 2010 DXSDK supported VS 2008 and VS 2010.

You can also try building your own DXERR or move to a newer version of Visual C++.

  • = Import libraries work fine which is why you aren't having problems with D3D10, D3DX10, and DXGI. DXGUID is a static library, but it just contains data segment stuff so it tends to not hit problems with mixed C Runtime versions.

See also Where is the DirectX SDK (2013 Edition)?, DirectX SDK Tools Catalog, Living without D3DX, DirectX SDKs of a certain age, DirectX SDK Samples Catalog