This post tells you how to determine what Microsoft libs need to be added when you get a link error regarding an unresolved external reference. For example:
19: unresolved external symbol _DnsQuery_A@24 referenced in function \"public: bool __thiscall Mx::MailToSmtpHost(char const *,class chilkat::StringBuffer &,class LogBase &)\" (?MailToSmtpHost@Mx@@QAE_NPBDAAVStringBuffer@chilkat@@AAVLogBase@@@Z)
..\absdebug\Admin.exe : fatal error LNK1120: 1 unresolved externals
- Search the microsoft.com site for the function name. In this case, the fact that the function ends in "_A" tells us that its the ANSI version of the function. The Unicode version would end in "_W". When searching, leave off the "_A" or "_W". Go to http://search.microsoft.com/ and type "DnsQuery site:microsoft.com".
- The first search result is most likely to be the MSDN page for your unresolved function. Click on it and scroll to the bottom of the page. Look for the Requirements table. It will tell you the operating systems supported, the name of the .h header file it is found in, and the name of the .lib file that must be included in your list of link libs in the Visual C++ Project Settings. In this case, it is dnsapi.lib
That’s all there is to it!