错误:
error LNK2019: 无法解析的外部符号 __imp__InternetGetLastResponseInfoA@12 ,该符号在函数 "protected: int __thiscall CUpdateDlg::GetErrorMessage(char *,unsigned int,unsigned int *)" (?GetErrorMessage@CUpdateDlg@@IAEHPADIPAI@Z) 中被引用。
分析:
一般来说这种连接错误可能的原因是:
1、如果是自己代码中写的函数,可能是只有函数的声明,缺少函数实现的。可能需要添加响应的cpp文件到项目中
2、若是系统函数或者别人提供的dll,可能是没有添加项目的链接库,添加链接库即可。
对于本次的错误是与InternetGetLastResponseInfo函数。通过查找MSDN可知,它是在wininet.dll中,所以在项目中添加wininet.lib即可。