C++ Link Errors / Latest Platform SDK / Set Include & Lib Search Paths

Question:

I updated to the latest Visual C++ Microsoft Platform SDK, but I still get these link errors:

CkBaseDbgSt.lib(Certificate.obj) : error LNK2001: unresolved external symbol
__imp__CertFreeCertificateChain@4
CkBaseDbgSt.lib(Certificate.obj) : error LNK2001: unresolved external symbol
__imp__CertFreeCertificateChainEngine@4
CkBaseDbgSt.lib(Certificate.obj) : error LNK2001: unresolved external symbol
__imp__CertGetCertificateChain@32
CkBaseDbgSt.lib(Certificate.obj) : error LNK2001: unresolved external symbol
__imp__CertCreateCertificateChainEngine@8
CkBaseDbgSt.lib(Certificate.obj) : error LNK2001: unresolved external symbol
__imp__CryptAcquireCertificatePrivateKey@24
Debug/IO_UI.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

Answer:

When you install Microsoft Visual C++ 6.0 from the product CDs, your Platform SDK will be from 1998, and these are quite old. The latest Platform SDK offered from Microsoft is dated February 2003. You can download and install this SDK from Latest Platform SDK. IMPORTANT:After downloading and installing, be sure to update your Visual C++ Tools/Options/Directories library and include search paths so that the new Platform SDK library and include files are actually used.