错误:
1>D3dx9.lib(ccompiler.obj) : error LNK2001: unresolved external symbol __vsnprintf
1>D3dx9.lib(cprogram.obj) : error LNK2001: unresolved external symbol __vsnprintf
1>D3dx9.lib(cparse.obj) : error LNK2001: unresolved external symbol __vsnprintf
1>D3dx9.lib(cimage.obj) : error LNK2001: unresolved external symbol __vsnprintf
1>D3dx9.lib(cpreprocessor.obj) : error LNK2001: unresolved external symbol __vsnprintf
1>D3dx9.lib(ctokenize.obj) : error LNK2001: unresolved external symbol __vsnprintf
1>D3dx9.lib(cassembler.obj) : error LNK2001: unresolved external symbol __vsnprintf
Error LNK2019 unresolved external symbol __vsnprintf referenced in function "long __stdcall StringVPrintfWorkerA(char *,unsigned int,unsigned int *,char const *,char *)" (?StringVPrintfWorkerA@@YGJPADIPAIPBD0@Z) Ancora D:\Moody\Moody\Projects\Projects\Ancora\Ancora\dxerr.lib(dxerra.obj)
解决方案:
#if _MSC_VER >= 1900
#pragma comment(lib,"legacy_stdio_definitions.lib")
#endif
也可参考这篇问答:
https://stackoverflow.com/questions/32418766/c-unresolved-external-symbol-sprintf-and-sscanf-in-visual-studio-2015
https://stackoverflow.com/questions/31053670/unresolved-external-symbol-vsnprintf-in-dxerr-lib