error LNK2019: 无法解析的外部符号 "int __cdecl wsprintf

“1>正在链接... 1>CDXGraph.obj : error LNK2019: 无法解析的外部符号 "int __cdecl wsprintfWInternal(wchar_t *,wchar_t const *,...)" (?wsprintfWInternal@@YAHPA_WPB_WZZ),该符号在函数 "private: void __thiscall CDXGraph::AddToObjectTable(void)" (?AddToObjectTable@CDXGraph@@AAEXXZ) 中被引用

 解决方法:

把wsprintfW改为swprintf即可。

swprintf(wsz, L"FilterGraph p pid x", (DWORD_PTR)mGraph, GetCurrentProcessId());

转自:http://blog.sina.com.cn/s/blog_4ae178ba0100rbcf.html

原文地址:https://www.cnblogs.com/stonehat/p/2617494.html