Archived Forum Post

Index of archived forum posts

Question:

Visual C++ 6.0 unresolved external symbols

Nov 24 '14 at 11:10

Hello,

I am evaluating CkImap and I only downloaded and compiled against this. Using some of the sample code, I am getting the following linker errors:

ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertDuplicateStore@4 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertDuplicateCertificateContext@4 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertDuplicateCertificateContext@4 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertEnumCertificatesInStore@8 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertCloseStore@8 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCertCloseStore@8 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertOpenStore@20 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCertOpenStore@20 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertFindCertificateInStore@24 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertAddEncodedCertificateToStore@24 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertFreeCertificateContext@4 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertFreeCertificateContext@4 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCertFreeCertificateContext@4 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertSetCertificateContextProperty@16 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertSetCertificateContextProperty@16 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertAddCertificateContextToStore@16 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertSaveStore@24 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertDeleteCertificateFromStore@4 ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol impCertGetSubjectCertificateFromStore@12 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCertGetSubjectCertificateFromStore@12 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertVerifyRevocation@28 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertNameToStrW@20 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCryptDecodeObject@28 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertGetIntendedKeyUsage@16 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertGetCertificateContextProperty@16 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCertGetCertificateContextProperty@16 ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2001: unresolved external symbol impCertCreateCertificateContext@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impgetsockopt@20 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impsetsockopt@20 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impaccept@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impioctlsocket@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impWSAGetLastError@0 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impsocket@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impWSAStartup@8 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impntohs@4 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impinet_ntoa@4 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impgetsockname@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impgethostbyname@4 ChilkatDbgDll.lib(HostnameResolve.obj) : error LNK2001: unresolved external symbol impgethostbyname@4 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impgetpeername@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impinet_addr@4 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol imphtons@4 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impconnect@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impselect@20 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol _WSAFDIsSet@8 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impbind@12 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol implisten@8 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impgethostname@8 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impclosesocket@4 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impshutdown@8 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol imprecv@16 ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol impsend@16 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptMsgControl@16 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptMsgGetParam@20 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptMsgClose@4 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptMsgUpdate@16 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptMsgOpenToDecode@24 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptDecryptMessage@24 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptSignMessage@28 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptEncodeObject@20 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptVerifyMessageSignature@28 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol impCryptVerifyDetachedMessageSignature@32 ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol imp__CryptEncryptMessage@28


Answer

Link with these additional Microsoft libs: crypt32.lib ws2_32.lib


Answer

Linking with crypt32.lib, ws2_32.lib does not work for me Here is my linking and simple source, and my error log as well
Error log : http://pastebin.com/Ni5Xa3kv
Linking : http://i1290.photobucket.com/albums/b537/loidangthanh/Error-chilkat_zps550de370.jpg

#include <CkHttp.h>
int main(){
    CkHttp http;
}

Any answer will be appreciated, thank you very much.


Answer

Google one of the unresolved functions, such as "CertOpenStore" to get to the Microsoft reference doc for that Platform SDK function. For example: http://msdn.microsoft.com/en-us/library/windows/desktop/aa376559%28v=vs.85%29.aspx

You will find on every Microsoft Platform SDK function's reference doc information about what system library is needed. For ALL of the unresolved externals you have, they are in crypt32.lib.