2013-08-28 193 views
3

我正在使用Chilkat庫編寫C++程序。我掛了整個庫項目如下:在Visual Studio Professional 2010中鏈接庫

project > properties > C/C++ > General > Additional Include Directories > C:\chilkat\include (That's where I have the library) 

project > properties > Linker > Input > Additional Dependencies > ... C:\chilkat\libs\ChilkatDbgDll.lib; ... 

奇爾卡特庫有4個種的.lib文件,分別用於不同種類的運行時來了,所以我用了.lib最適合我的項目(多線程調試DLL)。

該死的東西還是給了我這樣的:

1>------ Build started: Project: botnet, Configuration: Debug Win32 ------ 
    1>Build started 28.08.2013 20:47:29. 
    1>InitializeBuildStatus: 
    1> Touching "Debug\botnet.unsuccessfulbuild". 
    1>ClCompile: 
    1> botnet.cpp 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: void __thiscall ChilkatSocket::logSocketOptions(class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: void __thiscall ChilkatSocket::checkSetBufSizes(class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::acceptNextConnection2(class ChilkatSocket &,bool,unsigned int,class LogBase &,bool &)" ([email protected]@@[email protected][email protected]@[email protected]) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: void __thiscall ChilkatSocket::setNonBlocking(void)" ([email protected]@@QAEXXZ) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::createSocket_ipv4(class LogBase &,bool)" ([email protected]@@[email protected]@[email protected]) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::createSocket_ipv4(class LogBase &,bool)" ([email protected]@@[email protected]@[email protected]) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "bool __cdecl startupWSA(class LogBase &)" ([email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" ([email protected]@@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" ([email protected]@@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" ([email protected]@@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "struct hostent * __cdecl ck_gethostbyname(char const *,class LogBase &)" ([email protected]@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(HostnameResolve.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall ChilkatSocket::GetPeerName(class chilkat::StringBuffer &,int &)" ([email protected]@@[email protected]@@[email protected]) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl ChilkatSocket::isDottedIpAddress(char const *)" ([email protected]@@[email protected]) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl ChilkatSocket::isDottedIpAddress(char const *)" ([email protected]@@[email protected]) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::connectSocket2_ipv4(char const *,int,unsigned int,class LogBase &,class ProgressMonitor *,bool &)" ([email protected]@@[email protected]@[email protected]@[email protected]) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall ChilkatSocket::waitWriteable2(unsigned int,class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall ChilkatSocket::waitWriteableMs2(unsigned int,bool,class SocketParams &,class LogBase &)" ([email protected]@@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall ChilkatSocket::bindSysCall2(void *,int,class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall ChilkatSocket::listenOnPort(int &,int,bool,class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl ChilkatSocket::getLocalHostName_inner(class chilkat::StringBuffer &,class LogBase &)" ([email protected]@@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall ChilkatSocket::NewSocketAndListen(bool,class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __[email protected] referenced in function "public: bool __thiscall ChilkatSocket::NewSocketAndListen(bool,class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall ChilkatSocket::IsConnected(class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall ChilkatSocket::SendBytes2(unsigned char const *,unsigned int,unsigned int,unsigned int,class LogBase &,class SocketParams &)" ([email protected]@@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: int __thiscall MsCertificate::checkRevoked(class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: void __thiscall MsCertificate::dotNetDispose(void)" ([email protected]@@QAEXXZ) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl _getCertNameStr(struct _CRYPTOAPI_BLOB *,unsigned long,class XString &)" ([email protected]@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: __thiscall MsCertificate::MsCertificate(struct _CERT_CONTEXT const *,bool,class LogBase &)" ([email protected]@[email protected][email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall MsCertificate::linkPrivateKey(class XString &,bool,bool,class LogBase &)" ([email protected]@@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static void __cdecl MsCertificate::getRfc822NameFromContext(struct _CERT_CONTEXT const *,class XString &)" ([email protected]@@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: unsigned int __thiscall MsCertificate::getIntendedKeyUsage(void)" ([email protected]@@QAEIXZ) 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall MsCertificate::getKeyProviderInfo(int,class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static class MsCertificate * __cdecl MsCertificate::createFromDer(unsigned char const *,unsigned int,class LogBase &)" ([email protected]@@[email protected]@@@Z) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: class CertificateStore * __thiscall CertificateStore::dupStore(class LogBase *)" ([email protected]@@[email protected]@@@Z) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: void __thiscall CertificateStore::deleteKeyContainers(void)" ([email protected]@@AAEXXZ) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: void __thiscall CertificateStore::dotNetDispose(void)" ([email protected]@@QAEXXZ) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static class CertificateStore * __cdecl CertificateStore::createMemoryStore(class LogBase *)" ([email protected]@@[email protected]@@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: class MsCertificate * __thiscall CertificateStore::findIssuer(class MsCertificate &,class LogBase &,bool)" ([email protected]@@[email protected]@[email protected]@@[email protected]) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall CertificateStore::addEncodedCertificateUtf8(char const *,class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall CertificateStore::addCertWithPrivateKey(class MsCertificate &,class XString &,bool,class LogBase &,bool)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall CertificateStore::saveCertStore(class LogBase &)" ([email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall CertificateStore::removeCertificate(class MsCertificate *,class LogBase &)" ([email protected]@@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: class MsCertificate * __thiscall CertificateStore::findCertificate(struct _CERT_INFO *)" ([email protected]@@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol [email protected] 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInner(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl _ckMsCrypto::msCryptoSignature(class CryptoSettings2 &,class Certificate &,bool,class SystemCerts &,unsigned char const *,unsigned int,int,class DataBuffer &,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl _ckMsCrypto::msCryptoSignature(class CryptoSettings2 &,class Certificate &,bool,class SystemCerts &,unsigned char const *,unsigned int,int,class DataBuffer &,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msVerifySignatureInner(class CryptoSettings2 &,class DataBuffer const &,class DataBuffer &,class ExtPtrArray &,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msVerifyDetachedSignatureInner(class CryptoSettings2 &,class DataBuffer const &,unsigned char const *,unsigned long,class ExtPtrArray &,class LogBase &)" ([email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
    1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "private: static bool __cdecl _ckMsCrypto::msEncryptInner(class CryptoSettings2 &,unsigned char const *,unsigned long,class DataBuffer &,class ExtPtrArray &,class LogBase &)" ([email protected]_ckMsCryp[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
    1>c:\users\simboyd\documents\visual studio 2010\Projects\botnet\Debug\botnet.exe : fatal error LNK1120: 54 unresolved externals 
    1> 
    1>Build FAILED. 
    1> 
    1>Time Elapsed 00:00:01.33 
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

任何想法如何解決這一問題?提前致謝。


若有人想知道如何固定它:添加Crypt32.lib和WS2_32.LIB到額外的依賴性(接頭>輸入)。

+1

你應該鏈接附加的庫作爲winsock(ws_32.lib),它們是Chilkat的依賴關係。 – Jarod42

+0

錯誤消息說它無法找到ws_32.lib。任何想法,我可以得到它? – simboyd

回答

8

你沒有鏈接Windows套接字導入庫。他們的圖書館不會爲你提供幫助。它也需要添加到鏈接器依賴關係中。它看起來像他們的庫實際上是一個靜態庫,它期望你的程序被鏈接爲一個MT DLL。

ws2_32.lib添加到您的鏈接器設置配置(您添加第三方庫的位置)的庫列表中。

+0

感謝您的回答!我認爲這樣做了一些,但它仍然不是固定的。錯誤數量從54個減少到30個。查看此鏈接的錯誤代碼:http://pastebin.com/Ni5Xa3kv – simboyd

+5

加上Crypt32.lib – SChepurin

+0

謝謝你一噸,那修好了! – simboyd

1

它看起來像你需要鏈接到Ws2_32.lib這是導入庫winsock。

+0

現在的錯誤是:pastebin.com/Ni5Xa3kv – simboyd

相關問題