Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 C++ /w Google Protocol Buffers. Cannot find 60 externals. Cannot compile

Tags:

c++

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
like image 596
Vans S Avatar asked Dec 05 '12 22:12

Vans S


2 Answers

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.

like image 115
Vans S Avatar answered Nov 15 '22 01:11

Vans S


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.

like image 6
Alastair Maw Avatar answered Nov 14 '22 23:11

Alastair Maw