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.
Related
I've been like a pair of days trying to get a C++ app, but i'm stuck in the library / dll process, I have problems with those two.
I downloaded the c++ release for protobuf 3.0.0, made the .lib and the .dll ( to test the two of them ), I used this in order to get the .sln
cmake -Dprotobuf_BUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="../install" ../cmake
it gave me a solution which I opened with vs2015 and compiled for debug, then compiled me the files, then I generated the includes with the .bat provided.
So, when I go to VS2015 and try to compile with the .lib linked, it gives me this error
1>libprotobufd.lib(dynamic_message.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj
I am sure that I'm running the app in the lib building as debug and the game as debug too.
Also, I tried the .dll ( deleting the library and the references ), writing in the top of the main.cpp file "#define PROTOBUF_USE_DLLS" and I get a lot of linker errors like this
1>trycpp.pb.obj : 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 "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::internal::LogMessage::~LogMessage(void)" (??1LogMessage#internal#protobuf#google##QAE#XZ) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: class google::protobuf::internal::LogMessage & __thiscall google::protobuf::internal::LogMessage::operator<<(char const *)" (??6LogMessage#internal#protobuf#google##QAEAAV0123#PBD#Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::internal::LogFinisher::operator=(class google::protobuf::internal::LogMessage &)" (??4LogFinisher#internal#protobuf#google##QAEXAAVLogMessage#123##Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::Closure::~Closure(void)" (??1Closure#protobuf#google##UAE#XZ) referenced in function "public: virtual void * __thiscall google::protobuf::Closure::`scalar deleting destructor'(unsigned int)" (??_GClosure#protobuf#google##UAEPAXI#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::internal::FunctionClosure0::~FunctionClosure0(void)" (??1FunctionClosure0#internal#protobuf#google##UAE#XZ) referenced in function "public: virtual void * __thiscall google::protobuf::internal::FunctionClosure0::`scalar deleting destructor'(unsigned int)" (??_GFunctionClosure0#internal#protobuf#google##UAEPAXI#Z)
1>trycpp.pb.obj : 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 tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::OnShutdown(void (__cdecl*)(void))" (?OnShutdown#internal#protobuf#google##YAXP6AXXZ#Z) referenced in function "void __cdecl tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: void * __thiscall google::protobuf::Arena::AllocateAligned(class type_info const *,unsigned int)" (?AllocateAligned#Arena#protobuf#google##QAEPAXPBVtype_info##I#Z) referenced in function "public: struct google::protobuf::internal::InternalMetadataWithArena::Container * __thiscall google::protobuf::Arena::CreateInternal<struct google::protobuf::internal::InternalMetadataWithArena::Container>(bool)" (??$CreateInternal#UContainer#InternalMetadataWithArena#internal#protobuf#google###Arena#protobuf#google##QAEPAUContainer#InternalMetadataWithArena#internal#12#_N#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::Arena::AddListNode(void *,void (__cdecl*)(void *))" (?AddListNode#Arena#protobuf#google##QAEXPAXP6AX0#Z#Z) referenced in function "public: struct google::protobuf::internal::InternalMetadataWithArena::Container * __thiscall google::protobuf::Arena::CreateInternal<struct google::protobuf::internal::InternalMetadataWithArena::Container>(bool)" (??$CreateInternal#UContainer#InternalMetadataWithArena#internal#protobuf#google###Arena#protobuf#google##QAEPAUContainer#InternalMetadataWithArena#internal#12#_N#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::GoogleOnceInitImpl(int *,class google::protobuf::Closure *)" (?GoogleOnceInitImpl#protobuf#google##YAXPAHPAVClosure#12##Z) referenced in function "void __cdecl google::protobuf::GoogleOnceInit(int *,void (__cdecl*)(void))" (?GoogleOnceInit#protobuf#google##YAXPAHP6AXXZ#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::MergeFromFail(char const *,int)" (?MergeFromFail#internal#protobuf#google##YAXPBDH#Z) referenced in function "public: void __thiscall tryPhy::PhyData::MergeFrom(class tryPhy::PhyData const &)" (?MergeFrom#PhyData#tryPhy##QAEXABV12##Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "private: void __thiscall google::protobuf::UnknownFieldSet::ClearFallback(void)" (?ClearFallback#UnknownFieldSet#protobuf#google##AAEXXZ) referenced in function "public: void __thiscall google::protobuf::UnknownFieldSet::Clear(void)" (?Clear#UnknownFieldSet#protobuf#google##QAEXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class google::protobuf::MessageLite * __thiscall google::protobuf::MessageLite::New(class google::protobuf::Arena *)const " (?New#MessageLite#protobuf#google##UBEPAV123#PAVArena#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::MessageLite::InitializationErrorString(void)const " (?InitializationErrorString#MessageLite#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char * __thiscall google::protobuf::MessageLite::InternalSerializeWithCachedSizesToArray(bool,unsigned char *)const " (?InternalSerializeWithCachedSizesToArray#MessageLite#protobuf#google##UBEPAE_NPAE#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static class google::protobuf::DescriptorPool const * __cdecl google::protobuf::DescriptorPool::generated_pool(void)" (?generated_pool#DescriptorPool#protobuf#google##SAPBV123#XZ) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: class google::protobuf::FileDescriptor const * __thiscall google::protobuf::DescriptorPool::FindFileByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?FindFileByName#DescriptorPool#protobuf#google##QBEPBVFileDescriptor#23#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const *,int)" (?InternalAddGeneratedFile#DescriptorPool#protobuf#google##SAXPBXH#Z) referenced in function "void __cdecl tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::CopyFrom(class google::protobuf::Message const &)" (?CopyFrom#Message#protobuf#google##UAEXABV123##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::MergeFrom(class google::protobuf::Message const &)" (?MergeFrom#Message#protobuf#google##UAEXABV123##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::Message::InitializationErrorString(void)const " (?InitializationErrorString#Message#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::DiscardUnknownFields(void)" (?DiscardUnknownFields#Message#protobuf#google##UAEXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall google::protobuf::Message::SpaceUsed(void)const " (?SpaceUsed#Message#protobuf#google##UBEHXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::Message::GetTypeName(void)const " (?GetTypeName#Message#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::Clear(void)" (?Clear#Message#protobuf#google##UAEXXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall google::protobuf::Message::IsInitialized(void)const " (?IsInitialized#Message#protobuf#google##UBE_NXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::CheckTypeAndMergeFrom(class google::protobuf::MessageLite const &)" (?CheckTypeAndMergeFrom#Message#protobuf#google##UAEXABVMessageLite#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall google::protobuf::Message::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#Message#protobuf#google##UAE_NPAVCodedInputStream#io#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall google::protobuf::Message::ByteSize(void)const " (?ByteSize#Message#protobuf#google##UBEHXZ)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Message#protobuf#google##UBEXPAVCodedOutputStream#io#23##Z)
1>trycpp.pb.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall google::protobuf::Message::SetCachedSize(int)const " (?SetCachedSize#Message#protobuf#google##EBEXH#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const *,void (__cdecl*)(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &))" (?InternalRegisterGeneratedFile#MessageFactory#protobuf#google##SAXPBDP6AXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z#Z) referenced in function "void __cdecl tryPhy::protobuf_AddDesc_trycpp_2eproto(void)" (?protobuf_AddDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(class google::protobuf::Descriptor const *,class google::protobuf::Message const *)" (?InternalRegisterGeneratedMessage#MessageFactory#protobuf#google##SAXPBVDescriptor#23#PBVMessage#23##Z) referenced in function "void __cdecl tryPhy::`anonymous namespace'::protobuf_RegisterTypes(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?protobuf_RegisterTypes#?A0x859c682f#tryPhy##YAXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "private: bool __thiscall google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned __int64 *)" (?ReadLittleEndian64Fallback#CodedInputStream#io#protobuf#google##AAE_NPA_K#Z) referenced in function "public: bool __thiscall google::protobuf::io::CodedInputStream::ReadLittleEndian64(unsigned __int64 *)" (?ReadLittleEndian64#CodedInputStream#io#protobuf#google##QAE_NPA_K#Z)
1>trycpp.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::ReadTagWithCutoff(unsigned int)" (?ReadTagWithCutoff#CodedInputStream#io#protobuf#google##QAE?AU?$pair#I_N#std##I#Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl google::protobuf::internal::WireFormatLite::SkipField(class google::protobuf::io::CodedInputStream *,unsigned int)" (?SkipField#WireFormatLite#internal#protobuf#google##SA_NPAVCodedInputStream#io#34#I#Z) referenced in function "public: virtual bool __thiscall tryPhy::PhyData::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#PhyData#tryPhy##UAE_NPAVCodedInputStream#io#protobuf#google###Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteDouble(int,double,class google::protobuf::io::CodedOutputStream *)" (?WriteDouble#WireFormatLite#internal#protobuf#google##SAXHNPAVCodedOutputStream#io#34##Z) referenced in function "public: virtual void __thiscall tryPhy::PhyData::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#PhyData#tryPhy##UBEXPAVCodedOutputStream#io#protobuf#google###Z)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static class google::protobuf::internal::GeneratedMessageReflection * __cdecl google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(class google::protobuf::Descriptor const *,class google::protobuf::Message const *,int const * const,int,int,int,int,int,int)" (?NewGeneratedMessageReflection#GeneratedMessageReflection#internal#protobuf#google##SAPAV1234#PBVDescriptor#34#PBVMessage#34#QBHHHHHHH#Z) referenced in function "void __cdecl tryPhy::protobuf_AssignDesc_trycpp_2eproto(void)" (?protobuf_AssignDesc_trycpp_2eproto#tryPhy##YAXXZ)
1>trycpp.pb.obj : error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::ReflectionOps::Merge(class google::protobuf::Message const &,class google::protobuf::Message *)" (?Merge#ReflectionOps#internal#protobuf#google##SAXABVMessage#34#PAV534##Z) referenced in function "public: virtual void __thiscall tryPhy::PhyData::MergeFrom(class google::protobuf::Message const &)" (?MergeFrom#PhyData#tryPhy##UAEXABVMessage#protobuf#google###Z)
1>bin\windows\multiplayer.exe : fatal error LNK1120: 40 unresolved externals
I'm a bit lost and stuck, so if anyone can help me to redirect where I have to search for, I'll be grateful.
Thank you for your time
As I can't comment, will post this as an answer.
If I understood the structure of your projects correctly, this thing:
`1>libprotobufd.lib(dynamic_message.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj`
tells you that the Runtime library setting for the library you're trying to link and your project does not match.
Check Project Properties -> C/C++ -> Code generation -> Runtime Library and make sure this setting is the same for both projects.
P.S. also having a problem linking with static library containing proto-files in vs2015 update 3 but seems that your case is different..
Maybe you should add the PROTOBUF_USE_DLLS define in the Visual Studio project properties under C/C++ -> Preprocessor -> Preprocessor definitions? I'm guessing you might need that define when compiling protobuf the protobuf output cpp files too.
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.
I try to compile simple application on Qt5 (Windows 7) using 7z.dll. I use code samples from 7zip Client7z example, but i get next errors:
mainwindow.obj : error LNK2019: unresolved external symbol __imp__SysAllocString#4 referenced in function "long __cdecl StringToBstr(wchar_t const *,wchar_t * *)" (?StringToBstr##YAJPB_WPAPA_W#Z)
mainwindow.obj : error LNK2019: unresolved external symbol "class CStringBase<wchar_t> __cdecl ConvertPropVariantToString(struct tagPROPVARIANT const &)" (?ConvertPropVariantToString##YA?AV?$CStringBase#_W##ABUtagPROPVARIANT###Z) referenced in function "private: void __thiscall MainWindow::getArchiveContent(class QString const &)" (?getArchiveContent#MainWindow##AAEXABVQString###Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: long __thiscall NWindows::NCOM::CPropVariant::Clear(void)" (?Clear#CPropVariant#NCOM#NWindows##QAEJXZ) referenced in function "public: __thiscall NWindows::NCOM::CPropVariant::~CPropVariant(void)" (??1CPropVariant#NCOM#NWindows##QAE#XZ)
mainwindow.obj : error LNK2019: unresolved external symbol "public: bool __thiscall NWindows::NFile::NIO::CInFile::Open(wchar_t const *)" (?Open#CInFile#NIO#NFile#NWindows##QAE_NPB_W#Z) referenced in function "public: bool __thiscall CInFileStream::Open(wchar_t const *)" (?Open#CInFileStream##QAE_NPB_W#Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::Read(void *,unsigned int,unsigned int *)" (?Read#CInFileStream##UAGJPAXIPAI#Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::Seek(__int64,unsigned int,unsigned __int64 *)" (?Seek#CInFileStream##UAGJ_JIPA_K#Z)
mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CInFileStream::GetSize(unsigned __int64 *)" (?GetSize#CInFileStream##UAGJPA_K#Z)
mainwindow.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CInFileStream::~CInFileStream(void)" (??1CInFileStream##UAE#XZ) referenced in function "public: virtual void * __thiscall CInFileStream::`scalar deleting destructor'(unsigned int)" (??_GCInFileStream##UAEPAXI#Z)
debug\archive.exe : fatal error LNK1120: 8 unresolved externals
I will be grateful for any help in correcting these errors.
I followed the instructions to the best of my ability. downloaded GPBuffers 5.0rc1 put the src/google folder into my project directory. Added the path to Settings > C/C++ > "Additional Include Directories".
But I think I need to place a -lprotobuf compiler option somewhere. I tried adding this to the C/C++ and Linker in the Settings > xxx > Additional Command Line Parameters.
But no luck.
It seems the libprotobuf.lib, libprotobuf-lite.lib and libprotoc.lib are missing. Perhaps it did not build correctly..
I have my serverThread.cpp which looks like:
#include "serverThread.h"
#include "sendStruct.h"
#include <fstream>
#include <string>
#include "messages.pb.h"
The log is reproduced below.
It seems its missing a reference to some library. As most of the dependencies are there.
Error 62 error LNK1120: 60 unresolved externals C:\work\freetimeC+\ServerUpdater\Debug\ServerUpdater.exe
Error 37 error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const google::protobuf::internal::kEmptyString" (?kEmptyString#internal#protobuf#google##3V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##B) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 34 error LNK2001: unresolved external symbol "private: virtual void __thiscall google::protobuf::Message::SetCachedSize(int)const " (?SetCachedSize#Message#protobuf#google##EBEXH#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 27 error LNK2001: unresolved external symbol "public: virtual bool __thiscall google::protobuf::Message::IsInitialized(void)const " (?IsInitialized#Message#protobuf#google##UBE_NXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 28 error LNK2001: unresolved external symbol "public: virtual bool __thiscall google::protobuf::Message::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#Message#protobuf#google##UAE_NPAVCodedInputStream#io#23##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 21 error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::Message::GetTypeName(void)const " (?GetTypeName#Message#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 22 error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::Message::InitializationErrorString(void)const " (?InitializationErrorString#Message#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 35 error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall google::protobuf::MessageLite::InitializationErrorString(void)const " (?InitializationErrorString#MessageLite#protobuf#google##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 29 error LNK2001: unresolved external symbol "public: virtual int __thiscall google::protobuf::Message::ByteSize(void)const " (?ByteSize#Message#protobuf#google##UBEHXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 25 error LNK2001: unresolved external symbol "public: virtual int __thiscall google::protobuf::Message::SpaceUsed(void)const " (?SpaceUsed#Message#protobuf#google##UBEHXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 31 error LNK2001: unresolved external symbol "public: virtual unsigned char * __thiscall google::protobuf::MessageLite::SerializeWithCachedSizesToArray(unsigned char *)const " (?SerializeWithCachedSizesToArray#MessageLite#protobuf#google##UBEPAEPAE#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 23 error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::CheckTypeAndMergeFrom(class google::protobuf::MessageLite const &)" (?CheckTypeAndMergeFrom#Message#protobuf#google##UAEXABVMessageLite#23##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 26 error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::Clear(void)" (?Clear#Message#protobuf#google##UAEXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 32 error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::CopyFrom(class google::protobuf::Message const &)" (?CopyFrom#Message#protobuf#google##UAEXABV123##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 24 error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::DiscardUnknownFields(void)" (?DiscardUnknownFields#Message#protobuf#google##UAEXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 33 error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::MergeFrom(class google::protobuf::Message const &)" (?MergeFrom#Message#protobuf#google##UAEXABV123##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 30 error LNK2001: unresolved external symbol "public: virtual void __thiscall google::protobuf::Message::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Message#protobuf#google##UBEXPAVCodedOutputStream#io#23##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 43 error LNK2019: unresolved external symbol "private: bool __thiscall google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int *)" (?ReadVarint32Fallback#CodedInputStream#io#protobuf#google##AAE_NPAI#Z) referenced in function "public: bool __thiscall google::protobuf::io::CodedInputStream::ReadVarint32(unsigned int *)" (?ReadVarint32#CodedInputStream#io#protobuf#google##QAE_NPAI#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 53 error LNK2019: unresolved external symbol "private: static int __cdecl google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)" (?VarintSize32Fallback#CodedOutputStream#io#protobuf#google##CAHI#Z) referenced in function "public: static int __cdecl google::protobuf::io::CodedOutputStream::VarintSize32(unsigned int)" (?VarintSize32#CodedOutputStream#io#protobuf#google##SAHI#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 49 error LNK2019: unresolved external symbol "private: static unsigned char * __cdecl google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int,unsigned char *)" (?WriteVarint32FallbackToArray#CodedOutputStream#io#protobuf#google##CAPAEIPAE#Z) referenced in function "public: static unsigned char * __cdecl google::protobuf::io::CodedOutputStream::WriteTagToArray(unsigned int,unsigned char *)" (?WriteTagToArray#CodedOutputStream#io#protobuf#google##SAPAEIPAE#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 44 error LNK2019: unresolved external symbol "private: static void __cdecl google::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const *,int,enum google::protobuf::internal::WireFormat::Operation)" (?VerifyUTF8StringFallback#WireFormat#internal#protobuf#google##CAXPBDHW4Operation#1234##Z) referenced in function "public: static void __cdecl google::protobuf::internal::WireFormat::VerifyUTF8String(char const *,int,enum google::protobuf::internal::WireFormat::Operation)" (?VerifyUTF8String#WireFormat#internal#protobuf#google##SAXPBDHW4Operation#1234##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 42 error LNK2019: unresolved external symbol "private: unsigned int __thiscall google::protobuf::io::CodedInputStream::ReadTagFallback(void)" (?ReadTagFallback#CodedInputStream#io#protobuf#google##AAEIXZ) referenced in function "public: unsigned int __thiscall google::protobuf::io::CodedInputStream::ReadTag(void)" (?ReadTag#CodedInputStream#io#protobuf#google##QAEIXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 38 error LNK2019: unresolved external symbol "private: void __thiscall google::protobuf::UnknownFieldSet::ClearFallback(void)" (?ClearFallback#UnknownFieldSet#protobuf#google##AAEXXZ) referenced in function "public: void __thiscall google::protobuf::UnknownFieldSet::Clear(void)" (?Clear#UnknownFieldSet#protobuf#google##QAEXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 61 error LNK2019: unresolved external symbol "protected: void __thiscall google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)" (?Reserve#RepeatedPtrFieldBase#internal#protobuf#google##IAEXH#Z) referenced in function "protected: class ArchProtocol::Person_PhoneNumber * __thiscall google::protobuf::internal::RepeatedPtrFieldBase::Add<class google::protobuf::RepeatedPtrField<class ArchProtocol::Person_PhoneNumber>::TypeHandler>(void)" (??$Add#VTypeHandler#?$RepeatedPtrField#VPerson_PhoneNumber#ArchProtocol###protobuf#google###RepeatedPtrFieldBase#internal#protobuf#google##IAEPAVPerson_PhoneNumber#ArchProtocol##XZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 58 error LNK2019: unresolved external symbol "protected: void __thiscall google::protobuf::internal::RepeatedPtrFieldBase::Swap(class google::protobuf::internal::RepeatedPtrFieldBase *)" (?Swap#RepeatedPtrFieldBase#internal#protobuf#google##IAEXPAV1234##Z) referenced in function "public: void __thiscall google::protobuf::RepeatedPtrField<class ArchProtocol::Person_PhoneNumber>::Swap(class google::protobuf::RepeatedPtrField<class ArchProtocol::Person_PhoneNumber> *)" (?Swap#?$RepeatedPtrField#VPerson_PhoneNumber#ArchProtocol###protobuf#google##QAEXPAV123##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 2 error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(class google::protobuf::Descriptor const *,class google::protobuf::Message const *,int const * const,int,int,int,class google::protobuf::DescriptorPool const *,class google::protobuf::MessageFactory *,int)" (??0GeneratedMessageReflection#internal#protobuf#google##QAE#PBVDescriptor#23#PBVMessage#23#QBHHHHPBVDescriptorPool#23#PAVMessageFactory#23#H#Z) referenced in function "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 4 error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::internal::LogMessage::~LogMessage(void)" (??1LogMessage#internal#protobuf#google##QAE#XZ) referenced in function "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 7 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 "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 18 error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::UnknownFieldSet::~UnknownFieldSet(void)" (??1UnknownFieldSet#protobuf#google##QAE#XZ) referenced in function __unwindfunclet$??0Person_PhoneNumber#ArchProtocol##QAE#XZ$0 C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 20 error LNK2019: unresolved external symbol "public: __thiscall google::protobuf::UnknownFieldSet::UnknownFieldSet(void)" (??0UnknownFieldSet#protobuf#google##QAE#XZ) referenced in function "public: __thiscall ArchProtocol::Person_PhoneNumber::Person_PhoneNumber(void)" (??0Person_PhoneNumber#ArchProtocol##QAE#XZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 8 error LNK2019: unresolved external symbol "public: class google::protobuf::FileDescriptor const * __thiscall google::protobuf::DescriptorPool::FindFileByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?FindFileByName#DescriptorPool#protobuf#google##QBEPBVFileDescriptor#23#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 6 error LNK2019: unresolved external symbol "public: class google::protobuf::internal::LogMessage & __thiscall google::protobuf::internal::LogMessage::operator<<(char const *)" (??6LogMessage#internal#protobuf#google##QAEAAV0123#PBD#Z) referenced in function "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 60 error LNK2019: unresolved external symbol "public: int __thiscall google::protobuf::io::CodedInputStream::PushLimit(int)" (?PushLimit#CodedInputStream#io#protobuf#google##QAEHH#Z) referenced in function "public: static bool __cdecl google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual<class ArchProtocol::Person_PhoneNumber>(class google::protobuf::io::CodedInputStream*,class ArchProtocol::Person_PhoneNumber *)" (??$ReadMessageNoVirtual#VPerson_PhoneNumber#ArchProtocol###WireFormatLite#internal#protobuf#google##SA_NPAVCodedInputStream#io#23#PAVPerson_PhoneNumber#ArchProtocol###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 39 error LNK2019: unresolved external symbol "public: static bool __cdecl google::protobuf::internal::WireFormat::SkipField(class google::protobuf::io::CodedInputStream *,unsigned int,class google::protobuf::UnknownFieldSet *)" (?SkipField#WireFormat#internal#protobuf#google##SA_NPAVCodedInputStream#io#34#IPAVUnknownFieldSet#34##Z) referenced in function "public: virtual bool __thiscall ArchProtocol::Person_PhoneNumber::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#Person_PhoneNumber#ArchProtocol##UAE_NPAVCodedInputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 41 error LNK2019: unresolved external symbol "public: static bool __cdecl google::protobuf::internal::WireFormatLite::ReadString(class google::protobuf::io::CodedInputStream *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (?ReadString#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 ArchProtocol::Person_PhoneNumber::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#Person_PhoneNumber#ArchProtocol##UAE_NPAVCodedInputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 9 error LNK2019: unresolved external symbol "public: static class google::protobuf::DescriptorPool const * __cdecl google::protobuf::DescriptorPool::generated_pool(void)" (?generated_pool#DescriptorPool#protobuf#google##SAPBV123#XZ) referenced in function "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 3 error LNK2019: unresolved external symbol "public: static class google::protobuf::MessageFactory * __cdecl google::protobuf::MessageFactory::generated_factory(void)" (?generated_factory#MessageFactory#protobuf#google##SAPAV123#XZ) referenced in function "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 52 error LNK2019: unresolved external symbol "public: static int __cdecl google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(class google::protobuf::UnknownFieldSet const &)" (?ComputeUnknownFieldsSize#WireFormat#internal#protobuf#google##SAHABVUnknownFieldSet#34##Z) referenced in function "public: virtual int __thiscall ArchProtocol::Person_PhoneNumber::ByteSize(void)const " (?ByteSize#Person_PhoneNumber#ArchProtocol##UBEHXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 48 error LNK2019: unresolved external symbol "public: static unsigned char * __cdecl google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(class google::protobuf::UnknownFieldSet const &,unsigned char *)" (?SerializeUnknownFieldsToArray#WireFormat#internal#protobuf#google##SAPAEABVUnknownFieldSet#34#PAE#Z) referenced in function "public: virtual unsigned char * __thiscall ArchProtocol::Person_PhoneNumber::SerializeWithCachedSizesToArray(unsigned char *)const " (?SerializeWithCachedSizesToArray#Person_PhoneNumber#ArchProtocol##UBEPAEPAE#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 51 error LNK2019: unresolved external symbol "public: static unsigned char * __cdecl google::protobuf::io::CodedOutputStream::WriteRawToArray(void const *,int,unsigned char *)" (?WriteRawToArray#CodedOutputStream#io#protobuf#google##SAPAEPBXHPAE#Z) referenced in function "public: static unsigned char * __cdecl google::protobuf::io::CodedOutputStream::WriteStringToArray(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char *)" (?WriteStringToArray#CodedOutputStream#io#protobuf#google##SAPAEABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PAE#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 50 error LNK2019: unresolved external symbol "public: static unsigned char * __cdecl google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned __int64,unsigned char *)" (?WriteVarint64ToArray#CodedOutputStream#io#protobuf#google##SAPAE_KPAE#Z) referenced in function "public: static unsigned char * __cdecl google::protobuf::io::CodedOutputStream::WriteVarint32SignExtendedToArray(int,unsigned char *)" (?WriteVarint32SignExtendedToArray#CodedOutputStream#io#protobuf#google##SAPAEHPAE#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 16 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const *,int)" (?InternalAddGeneratedFile#DescriptorPool#protobuf#google##SAXPBXH#Z) referenced in function "void __cdecl ArchProtocol::protobuf_AddDesc_messages_2eproto(void)" (?protobuf_AddDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 54 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::ReflectionOps::Merge(class google::protobuf::Message const &,class google::protobuf::Message *)" (?Merge#ReflectionOps#internal#protobuf#google##SAXABVMessage#34#PAV534##Z) referenced in function "public: virtual void __thiscall ArchProtocol::Person_PhoneNumber::MergeFrom(class google::protobuf::Message const &)" (?MergeFrom#Person_PhoneNumber#ArchProtocol##UAEXABVMessage#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 45 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::WireFormat::SerializeUnknownFields(class google::protobuf::UnknownFieldSet const &,class google::protobuf::io::CodedOutputStream *)" (?SerializeUnknownFields#WireFormat#internal#protobuf#google##SAXABVUnknownFieldSet#34#PAVCodedOutputStream#io#34##Z) referenced in function "public:virtual void __thiscall ArchProtocol::Person_PhoneNumber::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Person_PhoneNumber#ArchProtocol##UBEXPAVCodedOutputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 46 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteEnum(int,int,class google::protobuf::io::CodedOutputStream *)" (?WriteEnum#WireFormatLite#internal#protobuf#google##SAXHHPAVCodedOutputStream#io#34##Z) referenced in function "public: virtual void __thiscall ArchProtocol::Person_PhoneNumber::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Person_PhoneNumber#ArchProtocol##UBEXPAVCodedOutputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 57 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteInt32(int,int,class google::protobuf::io::CodedOutputStream *)" (?WriteInt32#WireFormatLite#internal#protobuf#google##SAXHHPAVCodedOutputStream#io#34##Z) referenced in function "public: virtual void __thiscall ArchProtocol::Person::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Person#ArchProtocol##UBEXPAVCodedOutputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 56 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(int,class google::protobuf::MessageLite const &,class google::protobuf::io::CodedOutputStream *)" (?WriteMessageMaybeToArray#WireFormatLite#internal#protobuf#google##SAXHABVMessageLite#34#PAVCodedOutputStream#io#34##Z) referenced in function"public: virtual void __thiscall ArchProtocol::Person::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Person#ArchProtocol##UBEXPAVCodedOutputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 47 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteString(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class google::protobuf::io::CodedOutputStream *)" (?WriteString#WireFormatLite#internal#protobuf#google##SAXHABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PAVCodedOutputStream#io#34##Z) referenced in function "public: virtual void __thiscall ArchProtocol::Person_PhoneNumber::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes#Person_PhoneNumber#ArchProtocol##UBEXPAVCodedOutputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 15 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const *,void (__cdecl*)(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &))" (?InternalRegisterGeneratedFile#MessageFactory#protobuf#google##SAXPBDP6AXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z#Z) referenced in function "void __cdecl ArchProtocol::protobuf_AddDesc_messages_2eproto(void)" (?protobuf_AddDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 10 error LNK2019: unresolved external symbol "public: static void __cdecl google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(class google::protobuf::Descriptor const *,class google::protobuf::Message const *)" (?InternalRegisterGeneratedMessage#MessageFactory#protobuf#google##SAXPBVDescriptor#23#PBVMessage#23##Z) referenced in function "void __cdecl ArchProtocol::`anonymous namespace'::protobuf_RegisterTypes(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?protobuf_RegisterTypes#?A0x2751caee#ArchProtocol##YAXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 13 error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::Closure::~Closure(void)" (??1Closure#protobuf#google##UAE#XZ) referenced in function "public: virtual void * __thiscall google::protobuf::Closure::`scalar deleting destructor'(unsigned int)" (??_GClosure#protobuf#google##UAEPAXI#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 11 error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::internal::FunctionClosure0::~FunctionClosure0(void)" (??1FunctionClosure0#internal#protobuf#google##UAE#XZ) referenced in function "void __cdecl google::protobuf::GoogleOnceInit(int *,void (__cdecl*)(void))" (?GoogleOnceInit#protobuf#google##YAXPAHP6AXXZ#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 19 error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::Message::~Message(void)" (??1Message#protobuf#google##UAE#XZ) referenced in function __unwindfunclet$??0Person_PhoneNumber#ArchProtocol##QAE#XZ$0 C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 36 error LNK2019: unresolved external symbol "public: virtual __thiscall google::protobuf::MessageLite::~MessageLite(void)" (??1MessageLite#protobuf#google##UAE#XZ) referenced in function "public: virtual void * __thiscall google::protobuf::MessageLite::`scalar deleting destructor'(unsigned int)" (??_GMessageLite#protobuf#google##UAEPAXI#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 5 error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::internal::LogFinisher::operator=(class google::protobuf::internal::LogMessage &)" (??4LogFinisher#internal#protobuf#google##QAEXAAVLogMessage#123##Z) referenced in function "void __cdecl ArchProtocol::protobuf_AssignDesc_messages_2eproto(void)" (?protobuf_AssignDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 59 error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::io::CodedInputStream::PopLimit(int)" (?PopLimit#CodedInputStream#io#protobuf#google##QAEXH#Z) referenced in function "public: static bool __cdecl google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual<class ArchProtocol::Person_PhoneNumber>(class google::protobuf::io::CodedInputStream *,class ArchProtocol::Person_PhoneNumber *)" (??$ReadMessageNoVirtual#VPerson_PhoneNumber#ArchProtocol###WireFormatLite#internal#protobuf#google##SA_NPAVCodedInputStream#io#23#PAVPerson_PhoneNumber#ArchProtocol###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 40 error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::UnknownFieldSet::AddVarint(int,unsigned __int64)" (?AddVarint#UnknownFieldSet#protobuf#google##QAEXH_K#Z) referenced in function "public: virtual bool __thiscall ArchProtocol::Person_PhoneNumber::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream#Person_PhoneNumber#ArchProtocol##UAE_NPAVCodedInputStream#io#protobuf#google###Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 55 error LNK2019: unresolved external symbol "public: void __thiscall google::protobuf::UnknownFieldSet::MergeFrom(class google::protobuf::UnknownFieldSet const &)" (?MergeFrom#UnknownFieldSet#protobuf#google##QAEXABV123##Z) referenced in function "public: void __thiscall ArchProtocol::Person_PhoneNumber::MergeFrom(class ArchProtocol::Person_PhoneNumber const &)" (?MergeFrom#Person_PhoneNumber#ArchProtocol##QAEXABV12##Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 12 error LNK2019: unresolved external symbol "void __cdecl google::protobuf::GoogleOnceInitImpl(int *,class google::protobuf::Closure *)" (?GoogleOnceInitImpl#protobuf#google##YAXPAHPAVClosure#12##Z) referenced in function "void __cdecl google::protobuf::GoogleOnceInit(int *,void (__cdecl*)(void))" (?GoogleOnceInit#protobuf#google##YAXPAHP6AXXZ#Z) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 14 error LNK2019: unresolved external symbol "void __cdecl google::protobuf::internal::OnShutdown(void (__cdecl*)(void))" (?OnShutdown#internal#protobuf#google##YAXP6AXXZ#Z) referenced in function "void __cdecl ArchProtocol::protobuf_AddDesc_messages_2eproto(void)" (?protobuf_AddDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Error 17 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 ArchProtocol::protobuf_AddDesc_messages_2eproto(void)" (?protobuf_AddDesc_messages_2eproto#ArchProtocol##YAXXZ) C:\work\freetimeC+\ServerUpdater\ServerUpdater\messages.pb.obj
Needed to compile Protobuf correctly. There is a vsprojects folder. Just build ONLY the libprotobuf and add the libprotobuf.lib as reference to the project by going to:
Properties > Linker > Input : Additional Dependencies > Edit...
If you copied it to your project folder/google put in google/libprotobuf.lib
Everything should compile smoothly now.
If you are building protobufs as a DLL then you will also need to define PROTOBUF_USE_DLLS in your client application to get it to pull in the DLL import __declspec stuff properly.
See https://code.google.com/p/protobuf/issues/detail?id=308#c9 for details.
I'm trying to use OpenCV 2.3.1 for a video capture and processing app. I downloaded the precompiled libraries from here and went to compile a test application using the static libraries found in the build\x86\vc10\staticlib of the download folder. Upon trying to compile, Visual Studio greets me with the linker errors shown below. Having worked with libpng, gzip, and a few others in the past, I recognize the functions from those libraries in the linker errors.
Does using the precompiled libraries of OpenCV also require me to link in libpng, libjpeg, gzip, and numerous others, or am I missing something?
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzputs referenced in function "void __cdecl icvPuts(struct CvFileStorage *,char const *)" (?icvPuts##YAXPAUCvFileStorage##PBD#Z)
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzclose referenced in function "void __cdecl icvClose(struct CvFileStorage *)" (?icvClose##YAXPAUCvFileStorage###Z)
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzopen referenced in function _cvOpenFileStorage
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzgets referenced in function "char * __cdecl icvGets(struct CvFileStorage *,char *,int)" (?icvGets##YAPADPAUCvFileStorage##PADH#Z)
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzrewind referenced in function "void __cdecl icvRewind(struct CvFileStorage *)" (?icvRewind##YAXPAUCvFileStorage###Z)
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzeof referenced in function "int __cdecl icvEof(struct CvFileStorage *)" (?icvEof##YAHPAUCvFileStorage###Z)
1>opencv_highgui231d.lib(window_w32.obj) : error LNK2019: unresolved external symbol __imp__CreateToolbarEx#52 referenced in function "int __cdecl icvCreateTrackbar(char const *,char const *,int *,int,void (__cdecl*)(int),void (__cdecl*)(int,void *),void *)" (?icvCreateTrackbar##YAHPBD0PAHHP6AXH#ZP6AXHPAX#Z3#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIFileRelease#4 referenced in function "public: virtual void __thiscall CvCaptureAVI_VFW::close(void)" (?close#CvCaptureAVI_VFW##UAEXXZ)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIStreamRelease#4 referenced in function "public: virtual void __thiscall CvCaptureAVI_VFW::close(void)" (?close#CvCaptureAVI_VFW##UAEXXZ)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIStreamGetFrameClose#4 referenced in function "public: virtual void __thiscall CvCaptureAVI_VFW::close(void)" (?close#CvCaptureAVI_VFW##UAEXXZ)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIStreamGetFrameOpen#8 referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" (?open#CvCaptureAVI_VFW##UAE_NPBD#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIStreamInfoA#12 referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" (?open#CvCaptureAVI_VFW##UAE_NPBD#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIFileGetStream#16 referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" (?open#CvCaptureAVI_VFW##UAE_NPBD#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIFileOpenA#16 referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" (?open#CvCaptureAVI_VFW##UAE_NPBD#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIFileInit#0 referenced in function "void __cdecl icvInitCapture_VFW(void)" (?icvInitCapture_VFW##YAXXZ)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIStreamGetFrame#8 referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::grabFrame(void)" (?grabFrame#CvCaptureAVI_VFW##UAE_NXZ)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _ICClose#4 referenced in function "protected: void __thiscall CvCaptureCAM_VFW::closeHIC(void)" (?closeHIC#CvCaptureCAM_VFW##IAEXXZ)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _ICSendMessage#16 referenced in function "protected: void __thiscall CvCaptureCAM_VFW::closeHIC(void)" (?closeHIC#CvCaptureCAM_VFW##IAEXXZ)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _capCreateCaptureWindowA#32 referenced in function "public: virtual bool __thiscall CvCaptureCAM_VFW::open(int)" (?open#CvCaptureCAM_VFW##UAE_NH#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _capGetDriverDescriptionA#20 referenced in function "public: virtual bool __thiscall CvCaptureCAM_VFW::open(int)" (?open#CvCaptureCAM_VFW##UAE_NH#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _ICDecompress referenced in function "public: virtual struct _IplImage * __thiscall CvCaptureCAM_VFW::retrieveFrame(int)" (?retrieveFrame#CvCaptureCAM_VFW##UAEPAU_IplImage##H#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _ICOpen#12 referenced in function "public: virtual struct _IplImage * __thiscall CvCaptureCAM_VFW::retrieveFrame(int)" (?retrieveFrame#CvCaptureCAM_VFW##UAEPAU_IplImage##H#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIStreamSetFormat#16 referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" (?createStreams#CvVideoWriter_VFW##IAE_NUCvSize##_N#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIMakeCompressedStream#16 referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" (?createStreams#CvVideoWriter_VFW##IAE_NUCvSize##_N#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVISaveOptions#20 referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" (?createStreams#CvVideoWriter_VFW##IAE_NUCvSize##_N#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIFileCreateStreamA#12 referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" (?createStreams#CvVideoWriter_VFW##IAE_NUCvSize##_N#Z)
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIStreamWrite#32 referenced in function "public: virtual bool __thiscall CvVideoWriter_VFW::writeFrame(struct _IplImage const *)" (?writeFrame#CvVideoWriter_VFW##UAE_NPBU_IplImage###Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_destroy referenced in function "public: void __thiscall cv::Jpeg2KDecoder::close(void)" (?close#Jpeg2KDecoder#cv##QAEXXZ)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_stream_close referenced in function "public: void __thiscall cv::Jpeg2KDecoder::close(void)" (?close#Jpeg2KDecoder#cv##QAEXXZ)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_decode referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readHeader(void)" (?readHeader#Jpeg2KDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_stream_fopen referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readHeader(void)" (?readHeader#Jpeg2KDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_matrix_destroy referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" (?readData#Jpeg2KDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_readcmpt referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" (?readData#Jpeg2KDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_matrix_create referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" (?readData#Jpeg2KDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_getcmptbytype referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" (?readData#Jpeg2KDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_cmprof_destroy referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" (?readData#Jpeg2KDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_chclrspc referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" (?readData#Jpeg2KDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_cmprof_createfromclrspc referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" (?readData#Jpeg2KDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_encode referenced in function "public: virtual bool __thiscall cv::Jpeg2KEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#Jpeg2KEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_strtofmt referenced in function "public: virtual bool __thiscall cv::Jpeg2KEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#Jpeg2KEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_create referenced in function "public: virtual bool __thiscall cv::Jpeg2KEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#Jpeg2KEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_writecmpt referenced in function "protected: bool __thiscall cv::Jpeg2KEncoder::writeComponent8u(void *,class cv::Mat const &)" (?writeComponent8u#Jpeg2KEncoder#cv##IAE_NPAXABVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_init referenced in function "public: __thiscall cv::JasperInitializer::JasperInitializer(void)" (??0JasperInitializer#cv##QAE#XZ)
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_cleanup referenced in function "public: __thiscall cv::JasperInitializer::~JasperInitializer(void)" (??1JasperInitializer#cv##QAE#XZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_destroy_read_struct referenced in function "public: void __thiscall cv::PngDecoder::close(void)" (?close#PngDecoder#cv##QAEXXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_error referenced in function "protected: static void __cdecl cv::PngDecoder::readDataFromBuf(void *,unsigned char *,unsigned int)" (?readDataFromBuf#PngDecoder#cv##KAXPAXPAEI#Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_get_io_ptr referenced in function "protected: static void __cdecl cv::PngDecoder::readDataFromBuf(void *,unsigned char *,unsigned int)" (?readDataFromBuf#PngDecoder#cv##KAXPAXPAEI#Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_get_IHDR referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHeader#PngDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_info referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHeader#PngDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_init_io referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHeader#PngDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_read_fn referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHeader#PngDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_longjmp_fn referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHeader#PngDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_create_info_struct referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHeader#PngDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_create_read_struct referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHeader#PngDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_end referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_image referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_update_info referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_rgb_to_gray referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_gray_to_rgb referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_bgr referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_expand_gray_1_2_4_to_8 referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_palette_to_rgb referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_strip_alpha referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_swap referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_strip_16 referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" (?readData#PngDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_destroy_write_struct referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_write_end referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_write_image referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_write_info referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_IHDR referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_compression_strategy referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_compression_level referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_filter referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_compression_mem_level referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_write_fn referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_create_write_struct referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#PngEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFSetWarningHandler referenced in function "public: __thiscall cv::TiffDecoder::TiffDecoder(void)" (??0TiffDecoder#cv##QAE#XZ)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFSetErrorHandler referenced in function "public: __thiscall cv::TiffDecoder::TiffDecoder(void)" (??0TiffDecoder#cv##QAE#XZ)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFClose referenced in function "public: void __thiscall cv::TiffDecoder::close(void)" (?close#TiffDecoder#cv##QAEXXZ)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFGetField referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readHeader(void)" (?readHeader#TiffDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFOpen referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readHeader(void)" (?readHeader#TiffDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadEncodedTile referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" (?readData#TiffDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadEncodedStrip referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" (?readData#TiffDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadRGBATile referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" (?readData#TiffDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadRGBAStrip referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" (?readData#TiffDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFRGBAImageOK referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" (?readData#TiffDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFIsTiled referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" (?readData#TiffDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFWriteScanline referenced in function "protected: bool __thiscall cv::TiffEncoder::writeLibTiff(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?writeLibTiff#TiffEncoder#cv##IAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFScanlineSize referenced in function "protected: bool __thiscall cv::TiffEncoder::writeLibTiff(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?writeLibTiff#TiffEncoder#cv##IAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFSetField referenced in function "protected: bool __thiscall cv::TiffEncoder::writeLibTiff(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?writeLibTiff#TiffEncoder#cv##IAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_resync_to_restart referenced in function "void __cdecl cv::jpeg_buffer_src(struct jpeg_decompress_struct *,struct cv::JpegSource *)" (?jpeg_buffer_src#cv##YAXPAUjpeg_decompress_struct##PAUJpegSource#1##Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_destroy_decompress referenced in function "public: void __thiscall cv::JpegDecoder::close(void)" (?close#JpegDecoder#cv##QAEXXZ)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_read_header referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" (?readHeader#JpegDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_stdio_src referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" (?readHeader#JpegDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_CreateDecompress referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" (?readHeader#JpegDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_std_error referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" (?readHeader#JpegDecoder#cv##UAE_NXZ)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_finish_decompress referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readData(class cv::Mat &)" (?readData#JpegDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_read_scanlines referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readData(class cv::Mat &)" (?readData#JpegDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_start_decompress referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readData(class cv::Mat &)" (?readData#JpegDecoder#cv##UAE_NAAVMat#2##Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_alloc_huff_table referenced in function "int __cdecl cv::my_jpeg_load_dht(struct jpeg_decompress_struct *,unsigned char *,struct JHUFF_TBL * * const,struct JHUFF_TBL * * const)" (?my_jpeg_load_dht#cv##YAHPAUjpeg_decompress_struct##PAEQAPAUJHUFF_TBL##2#Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_destroy_compress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_finish_compress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_write_scanlines referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_start_compress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_set_quality referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_set_defaults referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_stdio_dest referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_CreateCompress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write#JpegEncoder#cv##UAE_NABVMat#2#ABV?$vector#HV?$allocator#H#std###std###Z)
1>D:\work\SimCapture\OpenCVTest\Debug\OpenCVTest.exe : fatal error LNK1120: 108 unresolved externals
I have a static build of OpenCV with most of the bells and whistles. VC10 OpenCV2.4.9(OCL woo) To fix a very similar problem I just linked to all of the following:
libpng.lib
libtiff.lib
zlib.lib
IlmImf.lib
libjasper.lib
libjpeg.lib
They were inside C:\Lib\opencv249\opencv\bld32\3rdparty\lib\Release
-Not sure which one did it but what the heck. Thanks Loozie!
PK
symbol _imp_CreateToolbarEx#52 referenced in function "int __cdecl icvCreateTrackbar(char const *,char const *,int *,int,void (__cdecl*)(int),void (__cdecl*)(int,void *),void *)" (?icvCreateTrackbar##YAHPBD0PAHHP6AXH#ZP6AXHPAX#Z3#Z)
add comctl32.lib to your linker input.
but after adding all this I still have lots of link errors don't know why...
like
higui.lib(window_w32.obj), _imp_getDCOrfEx#8
higui.lib(window_w32.obj), _imp_getClipBox#8
problem solved.
just add Gdi32.lib and my project goes fine.
to conclude:
1.build your own static lib with cmake.
2.3rd party libs should be added too.
3.windows libs like comctl32.lib, gdi32.lib should be added too.
4.careful check whether the libs(3rd) is complied /MTd mood. I have see LIBCMT.lib and MSVCRT.lib problems.
good luck.
Piecing together several of the other answers that I needed to get this to work, I needed to include this complete list in Linker >> Input >> Additional Dependencies:
opencv_core248d.lib
opencv_imgproc248d.lib
opencv_highgui248d.lib
opencv_ml248d.lib
opencv_video248d.lib
opencv_features2d248d.lib
opencv_calib3d248d.lib
opencv_objdetect248d.lib
opencv_contrib248d.lib
opencv_legacy248d.lib
opencv_flann248d.lib
libpngd.lib
libtiffd.lib
zlibd.lib
IlmImfd.lib
libjasperd.lib
libjpegd.lib
comctl32.lib
gdi32.lib
vfw32.lib
after ensuring that the project's Runtime Library is set to the /MTd option.
This is for Visual Studio 2013
the _avi* ones apparently can be found by linking ("additional dependencies") against
vfw32.lib
For the first 6 errors (_gzputs, etc...), you should to add zlib.lib (or zlibd.lib in Debug configuration) to your linker input.
There are several missing static libs in OpenCV 2.3.1 Windows package. These libraries are usually built as part of OpenCV library and you don't need to install them separately. So you can build OpenCV from sources yourself or use dynamic libraries from the package.
I think you must use the option "Use MFC in a Static Library" to make it work with static libraries.
I have a similiar problem with latest opencv built with Vs 2015 x64,
but after I added these third party libraries( at 3rd party/library/Debug or Release) , the problem was solved.
IlmImfd.lib
libjasperd.lib
libjpegd.lib
libpngd.lib
libtiffd.lib
libwebpd.lib
zlibd.lib