I complied c++ grpc file using protoc compiler, so i assume that that references should not give any problem.
I added "grpc\include" , "grpc\src" and "grpc\third_party\protobuf\src\google\protobuf" as include directory.
Interestingly, i'm getting :
error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::internal::LogMessage::LogMessage(enum google::protobuf::LogLevel,char const *,int)" (??0LogMessage#internal#protobuf#google##QAE#W4LogLevel#23#PBDH#Z) referenced in function "int __cdecl google::
error LNK2001: unresolved external symbol "public: virtual bool __thiscall google::protobuf::io::ZeroCopyOutputStream::WriteAliasedRaw(void const *,int)" (?WriteAliasedRaw#ZeroCopyOutputStream#io#protobuf#google##UAE_NPBXH#Z)
error LNK2019: unresolved external symbol "public: bool __thiscall google::protobuf::MessageLite::ParseFromZeroCopyStream(class google::protobuf::io::ZeroCopyInputStream *)" (?ParseFromZeroCopyStream#MessageLite#protobuf#google##QAE_NPAVZeroCopyInputStream#io#23##Z) referenced in function "class grpc::Status __cdecl grpc::GenericDeserialize<class grpc::ProtoBufferReader,class facialpluginpoc::NoParams>(class grpc::ByteBuffer *,class google::protobuf::MessageLite *)" (??$GenericDeserialize#VProtoBufferReader#grpc##VNoParams#facialpluginpoc###grpc##YA?AVStatus#0#PAVByteBuffer#0#PAVMessageLite#protobuf#google###Z)
error LNK2001: unresolved external symbol "class grpc::CoreCodegenInterface * grpc::g_core_codegen_interface" (?g_core_codegen_interface#grpc##3PAVCoreCodegenInterface#1#A)
error LNK2001: unresolved external symbol "class grpc::GrpcLibraryInterface * grpc::g_glip" (?g_glip#grpc##3PAVGrpcLibraryInterface#1#A)
error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::VerifyVersion(int,int,char const *)" (?VerifyVersion#internal#protobuf#google##YAXHHPBD#Z) referenced in function "void __cdecl InitDefaultsscc_info_NoParams_facialpluginpoc_2eproto(void)" (?InitDefaultsscc_info_NoParams_facialpluginpoc_2eproto##YAXXZ)
1>facialpluginpoc.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::OnShutdownRun(void (__cdecl*)(void const *),void const *)" (?OnShutdownRun#internal#protobuf#google##YAXP6AXPBX#Z0#Z) referenced in function "void __cdecl google::protobuf::internal::OnShutdownDestroyMessage(void const *)" (?OnShutdownDestroyMessage#internal#protobuf#google##YAXPBX#Z)
1>facialpluginpoc.pb.obj : error LNK2019: unresolved external symbol "private: __int64 __thiscall google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)" (?ReadVarint32Fallback#CodedInputStream#io#protobuf#google##AAE_JI#Z) referenced in function "public: bool __thiscall google::protobuf::io::CodedInputStream::ReadVarint32(unsigned int *)" (?ReadVarint32#CodedInputStream#io#protobuf#google##QAE_NPAI#Z)
1>facialpluginpoc.pb.obj : error LNK2019: unresolved external symbol "private: unsigned int __thiscall google::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int)" (?ReadTagFallback#CodedInputStream#io#protobuf#google##AAEII#Z) referenced in function "public: struct std::pair<unsigned int,bool> __thiscall google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag(unsigned int)" (?ReadTagWithCutoffNoLastTag#CodedInputStream#io#protobuf#google##QAE?AU?$pair#I_N#std##I#Z)
1>facialpluginpoc.pb.obj : error LNK2019: unresolved external symbol "public: static unsigned char * __cdecl google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char *)" (?WriteStringWithSizeToArray#CodedOutputStream#io#protobuf#google##SAPAEABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PAE#Z) referenced in function "public: static unsigned char * __cdecl google::protobuf::internal::WireFormatLite::WriteBytesToArray(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char *)" (?WriteBytesToArray#WireFormatLite#internal#protobuf#google##SAPAEHABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PAE#Z)
1>facialpluginpoc.pb.obj : error LNK2019: unresolved external symbol "public: void * __thiscall google::protobuf::internal::ArenaImpl::AllocateAligned(unsigned int)" (?AllocateAligned#ArenaImpl#internal#protobuf#google##QAEPAXI#Z) referenced in function "private: void * __thiscall google::protobuf::Arena::AllocateInternal<struct google::protobuf::internal::InternalMetadataWithArenaBase<class google::protobuf::UnknownFieldSet,class google::protobuf::internal::InternalMetadataWithArena>::Container>(bool)" (??$AllocateInternal#UContainer#?$InternalMetadataWithArenaBase#VUnknownFieldSet#protobuf#google##VInternalMetadataWithArena#internal#23##internal#protobuf#google###Arena#protobuf#google##AAEPAX_N#Z)
error LNK2019: unresolved external symbol "public: static bool __cdecl google::protobuf::internal::WireFormatLite::ReadBytes(class google::protobuf::io::CodedInputStream *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (?ReadBytes#WireFormatLite#internal#protobuf#google##SA_NPAVCodedInputStream#io#34#PAV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "public: virtual bool __thiscall facialpluginpoc::Result::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#Result#facialpluginpoc##UAE_NPAVCodedInputStream#io#protobuf#google###Z)
I have included all the required header files as project dependency, but still facing this issue.
Is this GRPC library/build/environment issue ? How to resolve this ?
C++ has two stages compiling and linking. From the errors in the post, looks like your includes are good which is not giving any compiler error but all are linker errors. During linking phase, it may be missing "google::protobuf::io" library or lib files.
I am getting following linker errors while building my cocos2d-x win32 project on calls to functions in unzip class.
1>ZipArchive.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void * __cdecl cocos2d::unzOpen(char const *)" (__imp_?unzOpen#cocos2d##YAPAXPBD#Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGetGlobalInfo(void *,struct cocos2d::unz_global_info_s *)" (__imp_?unzGetGlobalInfo#cocos2d##YAHPAXPAUunz_global_info_s#1##Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipOpenFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?UnzipOpenFile#ZipArchive#myproject##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzReadCurrentFile(void *,void *,unsigned int)" (__imp_?unzReadCurrentFile#cocos2d##YAHPAX0I#Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo#ZipArchive#myproject##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##_N#Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGoToNextFile(void *)" (__imp_?unzGoToNextFile#cocos2d##YAHPAX#Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo#ZipArchive#myproject##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##_N#Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGetCurrentFileInfo(void *,struct cocos2d::unz_file_info_s *,char *,unsigned long,void *,unsigned long,char *,unsigned long)" (__imp_?unzGetCurrentFileInfo#cocos2d##YAHPAXPAUunz_file_info_s#1#PADK0K2K#Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo#ZipArchive#myproject##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##_N#Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzOpenCurrentFilePassword(void *,char const *)" (__imp_?unzOpenCurrentFilePassword#cocos2d##YAHPAXPBD#Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo#ZipArchive#myproject##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##_N#Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzOpenCurrentFile(void *)" (__imp_?unzOpenCurrentFile#cocos2d##YAHPAX#Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo#ZipArchive#myproject##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##_N#Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzGoToFirstFile(void *)" (__imp_?unzGoToFirstFile#cocos2d##YAHPAX#Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipFileTo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool)" (?UnzipFileTo#ZipArchive#myproject##QAE_NV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##_N#Z)
1>ZipArchive.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl cocos2d::unzClose(void *)" (__imp_?unzClose#cocos2d##YAHPAX#Z) referenced in function "public: bool __thiscall myproject::ZipArchive::UnzipCloseFile(void)" (?UnzipCloseFile#ZipArchive#myproject##QAE_NXZ)
I added libzlib.lib to my Additional Dependencies but it still gives me the errors. I am using VS2010
I'm writing a C++ program using Chilkat library. I've linked the whole library to the project as follows:
project > properties > C/C++ > General > Additional Include Directories > C:\chilkat\include (That's where I have the library)
AND
project > properties > Linker > Input > Additional Dependencies > ... C:\chilkat\libs\ChilkatDbgDll.lib; ...
Chilkat library came with 4 kinds of .lib files, each for different kinds of runtime, so I used the .lib which best suited my project (Multi-Threaded Debug DLL).
The damn thing still gives me this:
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 __imp__getsockopt#20 referenced in function "public: void __thiscall ChilkatSocket::logSocketOptions(class LogBase &)" (?logSocketOptions#ChilkatSocket##QAEXAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__setsockopt#20 referenced in function "private: void __thiscall ChilkatSocket::checkSetBufSizes(class LogBase &)" (?checkSetBufSizes#ChilkatSocket##AAEXAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__accept#12 referenced in function "private: bool __thiscall ChilkatSocket::acceptNextConnection2(class ChilkatSocket &,bool,unsigned int,class LogBase &,bool &)" (?acceptNextConnection2#ChilkatSocket##AAE_NAAV1#_NIAAVLogBase##AA_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__ioctlsocket#12 referenced in function "public: void __thiscall ChilkatSocket::setNonBlocking(void)" (?setNonBlocking#ChilkatSocket##QAEXXZ)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__WSAGetLastError#0 referenced in function "private: bool __thiscall ChilkatSocket::createSocket_ipv4(class LogBase &,bool)" (?createSocket_ipv4#ChilkatSocket##AAE_NAAVLogBase##_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__socket#12 referenced in function "private: bool __thiscall ChilkatSocket::createSocket_ipv4(class LogBase &,bool)" (?createSocket_ipv4#ChilkatSocket##AAE_NAAVLogBase##_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__WSAStartup#8 referenced in function "bool __cdecl startupWSA(class LogBase &)" (?startupWSA##YA_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__ntohs#4 referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" (?ck_getsockname_ipv4#ChilkatSocket##AAE_NAAVStringBuffer#chilkat##AAHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__inet_ntoa#4 referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" (?ck_getsockname_ipv4#ChilkatSocket##AAE_NAAVStringBuffer#chilkat##AAHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__getsockname#12 referenced in function "private: bool __thiscall ChilkatSocket::ck_getsockname_ipv4(class chilkat::StringBuffer &,int &,class LogBase &)" (?ck_getsockname_ipv4#ChilkatSocket##AAE_NAAVStringBuffer#chilkat##AAHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__gethostbyname#4 referenced in function "struct hostent * __cdecl ck_gethostbyname(char const *,class LogBase &)" (?ck_gethostbyname##YAPAUhostent##PBDAAVLogBase###Z)
1>ChilkatDbgDll.lib(HostnameResolve.obj) : error LNK2001: unresolved external symbol __imp__gethostbyname#4
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__getpeername#12 referenced in function "public: bool __thiscall ChilkatSocket::GetPeerName(class chilkat::StringBuffer &,int &)" (?GetPeerName#ChilkatSocket##QAE_NAAVStringBuffer#chilkat##AAH#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__inet_addr#4 referenced in function "public: static bool __cdecl ChilkatSocket::isDottedIpAddress(char const *)" (?isDottedIpAddress#ChilkatSocket##SA_NPBD#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__htons#4 referenced in function "public: static bool __cdecl ChilkatSocket::isDottedIpAddress(char const *)" (?isDottedIpAddress#ChilkatSocket##SA_NPBD#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__connect#12 referenced in function "private: bool __thiscall ChilkatSocket::connectSocket2_ipv4(char const *,int,unsigned int,class LogBase &,class ProgressMonitor *,bool &)" (?connectSocket2_ipv4#ChilkatSocket##AAE_NPBDHIAAVLogBase##PAVProgressMonitor##AA_N#Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__select#20 referenced in function "public: bool __thiscall ChilkatSocket::waitWriteable2(unsigned int,class LogBase &)" (?waitWriteable2#ChilkatSocket##QAE_NIAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol ___WSAFDIsSet#8 referenced in function "public: bool __thiscall ChilkatSocket::waitWriteableMs2(unsigned int,bool,class SocketParams &,class LogBase &)" (?waitWriteableMs2#ChilkatSocket##QAE_NI_NAAVSocketParams##AAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__bind#12 referenced in function "private: bool __thiscall ChilkatSocket::bindSysCall2(void *,int,class LogBase &)" (?bindSysCall2#ChilkatSocket##AAE_NPAXHAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__listen#8 referenced in function "public: bool __thiscall ChilkatSocket::listenOnPort(int &,int,bool,class LogBase &)" (?listenOnPort#ChilkatSocket##QAE_NAAHH_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__gethostname#8 referenced in function "private: static bool __cdecl ChilkatSocket::getLocalHostName_inner(class chilkat::StringBuffer &,class LogBase &)" (?getLocalHostName_inner#ChilkatSocket##CA_NAAVStringBuffer#chilkat##AAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__closesocket#4 referenced in function "public: bool __thiscall ChilkatSocket::NewSocketAndListen(bool,class LogBase &)" (?NewSocketAndListen#ChilkatSocket##QAE_N_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__shutdown#8 referenced in function "public: bool __thiscall ChilkatSocket::NewSocketAndListen(bool,class LogBase &)" (?NewSocketAndListen#ChilkatSocket##QAE_N_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__recv#16 referenced in function "public: bool __thiscall ChilkatSocket::IsConnected(class LogBase &)" (?IsConnected#ChilkatSocket##QAE_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(ChilkatSocket.obj) : error LNK2019: unresolved external symbol __imp__send#16 referenced in function "public: bool __thiscall ChilkatSocket::SendBytes2(unsigned char const *,unsigned int,unsigned int,unsigned int,class LogBase &,class SocketParams &)" (?SendBytes2#ChilkatSocket##QAE_NPBEIIIAAVLogBase##AAVSocketParams###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertVerifyRevocation#28 referenced in function "public: int __thiscall MsCertificate::checkRevoked(class LogBase &)" (?checkRevoked#MsCertificate##QAEHAAVLogBase###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertFreeCertificateContext#4 referenced in function "public: void __thiscall MsCertificate::dotNetDispose(void)" (?dotNetDispose#MsCertificate##QAEXXZ)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext#4
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext#4
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertNameToStrW#20 referenced in function "void __cdecl _getCertNameStr(struct _CRYPTOAPI_BLOB *,unsigned long,class XString &)" (?_getCertNameStr##YAXPAU_CRYPTOAPI_BLOB##KAAVXString###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertDuplicateCertificateContext#4 referenced in function "public: __thiscall MsCertificate::MsCertificate(struct _CERT_CONTEXT const *,bool,class LogBase &)" (??0MsCertificate##QAE#PBU_CERT_CONTEXT##_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext#4
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertSetCertificateContextProperty#16 referenced in function "public: bool __thiscall MsCertificate::linkPrivateKey(class XString &,bool,bool,class LogBase &)" (?linkPrivateKey#MsCertificate##QAE_NAAVXString##_N1AAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertSetCertificateContextProperty#16
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CryptDecodeObject#28 referenced in function "public: static void __cdecl MsCertificate::getRfc822NameFromContext(struct _CERT_CONTEXT const *,class XString &)" (?getRfc822NameFromContext#MsCertificate##SAXPBU_CERT_CONTEXT##AAVXString###Z)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertGetIntendedKeyUsage#16 referenced in function "public: unsigned int __thiscall MsCertificate::getIntendedKeyUsage(void)" (?getIntendedKeyUsage#MsCertificate##QAEIXZ)
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertGetCertificateContextProperty#16 referenced in function "private: bool __thiscall MsCertificate::getKeyProviderInfo(int,class LogBase &)" (?getKeyProviderInfo#MsCertificate##AAE_NHAAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertGetCertificateContextProperty#16
1>ChilkatDbgDll.lib(MsCertificate.obj) : error LNK2019: unresolved external symbol __imp__CertCreateCertificateContext#12 referenced in function "public: static class MsCertificate * __cdecl MsCertificate::createFromDer(unsigned char const *,unsigned int,class LogBase &)" (?createFromDer#MsCertificate##SAPAV1#PBEIAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertDuplicateStore#4 referenced in function "public: class CertificateStore * __thiscall CertificateStore::dupStore(class LogBase *)" (?dupStore#CertificateStore##QAEPAV1#PAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertEnumCertificatesInStore#8 referenced in function "private: void __thiscall CertificateStore::deleteKeyContainers(void)" (?deleteKeyContainers#CertificateStore##AAEXXZ)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertCloseStore#8 referenced in function "public: void __thiscall CertificateStore::dotNetDispose(void)" (?dotNetDispose#CertificateStore##QAEXXZ)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertCloseStore#8
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertOpenStore#20 referenced in function "public: static class CertificateStore * __cdecl CertificateStore::createMemoryStore(class LogBase *)" (?createMemoryStore#CertificateStore##SAPAV1#PAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertOpenStore#20
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertFindCertificateInStore#24 referenced in function "public: class MsCertificate * __thiscall CertificateStore::findIssuer(class MsCertificate &,class LogBase &,bool)" (?findIssuer#CertificateStore##QAEPAVMsCertificate##AAV2#AAVLogBase##_N#Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertAddEncodedCertificateToStore#24 referenced in function "public: bool __thiscall CertificateStore::addEncodedCertificateUtf8(char const *,class LogBase &)" (?addEncodedCertificateUtf8#CertificateStore##QAE_NPBDAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertAddCertificateContextToStore#16 referenced in function "public: bool __thiscall CertificateStore::addCertWithPrivateKey(class MsCertificate &,class XString &,bool,class LogBase &,bool)" (?addCertWithPrivateKey#CertificateStore##QAE_NAAVMsCertificate##AAVXString##_NAAVLogBase##2#Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertSaveStore#24 referenced in function "private: bool __thiscall CertificateStore::saveCertStore(class LogBase &)" (?saveCertStore#CertificateStore##AAE_NAAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertDeleteCertificateFromStore#4 referenced in function "public: bool __thiscall CertificateStore::removeCertificate(class MsCertificate *,class LogBase &)" (?removeCertificate#CertificateStore##QAE_NPAVMsCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(CertificateStore.obj) : error LNK2019: unresolved external symbol __imp__CertGetSubjectCertificateFromStore#12 referenced in function "public: class MsCertificate * __thiscall CertificateStore::findCertificate(struct _CERT_INFO *)" (?findCertificate#CertificateStore##QAEPAVMsCertificate##PAU_CERT_INFO###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2001: unresolved external symbol __imp__CertGetSubjectCertificateFromStore#12
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgControl#16 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgGetParam#20 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgClose#4 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgUpdate#16 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptMsgOpenToDecode#24 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInnerAlt(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInnerAlt#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptDecryptMessage#24 referenced in function "private: static bool __cdecl _ckMsCrypto::msDecryptInner(class DataBuffer const &,class DataBuffer &,class Certificate * *,class LogBase &)" (?msDecryptInner#_ckMsCrypto##CA_NABVDataBuffer##AAV2#PAPAVCertificate##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptSignMessage#28 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 &)" (?msCryptoSignature#_ckMsCrypto##SA_NAAVCryptoSettings2##AAVCertificate##_NAAVSystemCerts##PBEIHAAVDataBuffer##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptEncodeObject#20 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 &)" (?msCryptoSignature#_ckMsCrypto##SA_NAAVCryptoSettings2##AAVCertificate##_NAAVSystemCerts##PBEIHAAVDataBuffer##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptVerifyMessageSignature#28 referenced in function "private: static bool __cdecl _ckMsCrypto::msVerifySignatureInner(class CryptoSettings2 &,class DataBuffer const &,class DataBuffer &,class ExtPtrArray &,class LogBase &)" (?msVerifySignatureInner#_ckMsCrypto##CA_NAAVCryptoSettings2##ABVDataBuffer##AAV3#AAVExtPtrArray##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptVerifyDetachedMessageSignature#32 referenced in function "private: static bool __cdecl _ckMsCrypto::msVerifyDetachedSignatureInner(class CryptoSettings2 &,class DataBuffer const &,unsigned char const *,unsigned long,class ExtPtrArray &,class LogBase &)" (?msVerifyDetachedSignatureInner#_ckMsCrypto##CA_NAAVCryptoSettings2##ABVDataBuffer##PBEKAAVExtPtrArray##AAVLogBase###Z)
1>ChilkatDbgDll.lib(_ckMsCrypto.obj) : error LNK2019: unresolved external symbol __imp__CryptEncryptMessage#28 referenced in function "private: static bool __cdecl _ckMsCrypto::msEncryptInner(class CryptoSettings2 &,unsigned char const *,unsigned long,class DataBuffer &,class ExtPtrArray &,class LogBase &)" (?msEncryptInner#_ckMsCrypto##CA_NAAVCryptoSettings2##PBEKAAVDataBuffer##AAVExtPtrArray##AAVLogBase###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 ==========
Any idea how to fix this? Thanks in advance.
If anybody is wondering how I fixed it: add Crypt32.lib and ws2_32.lib to additional dependencies (Linker > Input).
You're not linking the windows sockets import lib. Their library won't pull it in for you. It needs to be added to your linker-dependencies as well. It looks like their library is actually a static lib that expects your program to be linked as a MT DLL.
Add ws2_32.lib to your library list on your linker settings configuration (where you added your 3rd-party library).
It looks like you need to link to Ws2_32.lib which is the import library winsock.
When I try to build my C++ application, I get a lot of unresolved external errors:
1>game.obj : error LNK2019: unresolved external symbol "public: __thiscall Player::Player(void)" (??0Player##QAE#XZ) referenced in function "public: __thiscall Game::Game(void)" (??0Game##QAE#XZ)
1>game.obj : error LNK2019: unresolved external symbol "public: __thiscall Player::Player(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0Player##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "public: void __thiscall Game::newMonster(void)" (?newMonster#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Player::gameOver(void)" (?gameOver#Player##QAE_NXZ) referenced in function "public: void __thiscall Game::defaultMenu(void)" (?defaultMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::updatePet(int,class Pet *)" (?updatePet#Player##QAEXHPAVPet###Z) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Player::enemyName(void)" (?enemyName#Player##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: class Pet * __thiscall Player::getMonster(int)" (?getMonster#Player##QAEPAVPet##H#Z) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: int __thiscall Player::getMonsterSize(void)" (?getMonsterSize#Player##QAEHXZ) referenced in function "public: void __thiscall Game::inGameMenu(void)" (?inGameMenu#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Player::getName(void)" (?getName#Player##QAE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ) referenced in function "public: void __thiscall Game::saveMonster(void)" (?saveMonster#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::addMonster(class Pet *)" (?addMonster#Player##QAEXPAVPet###Z) referenced in function "public: void __thiscall Game::loadMonster(void)" (?loadMonster#Game##QAEXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::setName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?setName#Player##QAEXV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "public: void __thiscall Game::loadMonster(void)" (?loadMonster#Game##QAEXXZ)
1>fatal error LNK1120: 10 unresolved externals
The thing is, these errors didn't show up a couple days ago. They just appeared suddenly out of nowhere.
I also have included my Player.h inside the Player.cpp and Game.cpp where it should be needed.
Can anyone help me here?
I m using taglib for one of my projects . The Debug/Release library is build using MSVC 10. On compiling the code with the library in taglib/taglib/Release some linker error are thrown .
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TagLib::AudioPropertie
s * __cdecl TagLib::FileRef::audioProperties(void)const " (__imp_?audioProperties#FileRef#TagLib##QEBAPEAVAudioProp
erties#2#XZ) referenced in function "struct MetaData __cdecl ID3::getMetaDataOfFile(class std::basic_string<char,st
ruct std::char_traits<char>,class std::allocator<char> >)" (?getMetaDataOfFile#ID3##YA?AUMetaData##V?$basic_string#
DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl TagLib::Stri
ng::~String(void)" (__imp_??1String#TagLib##UEAA#XZ) referenced in function "struct MetaData __cdecl ID3::getMetaDa
taOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMetaDataOfF
ile#ID3##YA?AUMetaData##V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char
,struct std::char_traits<char>,class std::allocator<char> > __cdecl TagLib::String::to8Bit(bool)const " (__imp_?to8
Bit#String#TagLib##QEBA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##_N#Z) referenced in function
"struct MetaData __cdecl ID3::getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class s
td::allocator<char> >)" (?getMetaDataOfFile#ID3##YA?AUMetaData##V?$basic_string#DU?$char_traits#D#std##V?$allocator
#D#2##std###Z)
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl TagLib::File
Ref::~FileRef(void)" (__imp_??1FileRef#TagLib##UEAA#XZ) referenced in function "struct MetaData __cdecl ID3::getMet
aDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMetaData
OfFile#ID3##YA?AUMetaData##V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TagLib::Tag * __cdecl
TagLib::FileRef::tag(void)const " (__imp_?tag#FileRef#TagLib##QEBAPEAVTag#2#XZ) referenced in function "struct Meta
Data __cdecl ID3::getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator
<char> >)" (?getMetaDataOfFile#ID3##YA?AUMetaData##V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z
)
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl TagLib::FileRef
::isNull(void)const " (__imp_?isNull#FileRef#TagLib##QEBA_NXZ) referenced in function "struct MetaData __cdecl ID3:
:getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getM
etaDataOfFile#ID3##YA?AUMetaData##V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl TagLib::FileRef::Fil
eRef(class TagLib::FileName,bool,enum TagLib::AudioProperties::ReadStyle)" (__imp_??0FileRef#TagLib##QEAA#VFileName
#1#_NW4ReadStyle#AudioProperties#1##Z) referenced in function "struct MetaData __cdecl ID3::getMetaDataOfFile(class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMetaDataOfFile#ID3##YA?AU
MetaData##V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl TagLib::FileName::Fi
leName(char const *)" (__imp_??0FileName#TagLib##QEAA#PEBD#Z) referenced in function "struct MetaData __cdecl ID3::
getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMe
taDataOfFile#ID3##YA?AUMetaData##V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
I m only including tag.lib from taglib/taglib/Release folder . Is there some other library I m missing out?