草庐IT

c++ - Visual Studio 2010 C++/w Google Protocol Buffer 。找不到 60 个外部对象。无法编译

coder 2024-02-09 原文

我已尽我所能按照说明进行操作。下载的 GPBuffers 5.0rc1 将 src/google 文件夹放入我的项目目录。添加了设置> C/C++ >“其他包含目录”的路径。

但我想我需要在某处放置一个 -lprotobuf 编译器选项。我尝试将其添加到设置 > xxx > 附加命令行参数中的 C/C++ 和链接器。

但运气不好。

似乎缺少 libprotobuf.lib、libprotobuf-lite.lib 和 libprotoc.lib。也许它没有正确构建..

我有我的 serverThread.cpp,它看起来像:

#include "serverThread.h"
#include "sendStruct.h"

#include <fstream>
#include <string>
#include "messages.pb.h"

日志转载如下。

它似乎缺少对某个库的引用。因为大多数依赖项都在那里。

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

最佳答案

需要正确编译 Protobuf。有一个 vsprojects 文件夹。只需构建 libprotobuf 并将 libprotobuf.lib 添加为对项目的引用,方法是:

属性 > 链接器 > 输入:附加依赖项 > 编辑...

如果你把它复制到你的项目文件夹/google 放在 google/libprotobuf.lib

现在一切都应该顺利编译。

关于c++ - Visual Studio 2010 C++/w Google Protocol Buffer 。找不到 60 个外部对象。无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13733604/

有关c++ - Visual Studio 2010 C++/w Google Protocol Buffer 。找不到 60 个外部对象。无法编译的更多相关文章

  1. ruby-on-rails - 如何优雅地重启 thin + nginx? - 2

    我的瘦服务器配置了nginx,我的ROR应用程序正在它们上运行。在我发布代码更新时运行thinrestart会给我的应用程序带来一些停机时间。我试图弄清楚如何优雅地重启正在运行的Thin实例,但找不到好的解决方案。有没有人能做到这一点? 最佳答案 #Restartjustthethinserverdescribedbythatconfigsudothin-C/etc/thin/mysite.ymlrestartNginx将继续运行并代理请求。如果您将Nginx设置为使用多个上游服务器,例如server{listen80;server

  2. ruby - 无法在 60 秒内获得稳定的 Firefox 连接 (127.0.0.1 :7055) - 2

    我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类

  3. ruby - 使用 `+=` 和 `send` 方法 - 2

    如何将send与+=一起使用?a=20;a.send"+=",10undefinedmethod`+='for20:Fixnuma=20;a+=10=>30 最佳答案 恐怕你不能。+=不是方法,而是语法糖。参见http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html它说Incommonwithmanyotherlanguages,Rubyhasasyntacticshortcut:a=a+2maybewrittenasa+=2.你能做的最好的事情是:

  4. ruby-on-rails - rbenv:从 RVM 移动到 rbenv 后,在 Jenkins 执行 shell 中找不到命令 - 2

    我从Ubuntu服务器上的RVM转移到rbenv。当我使用RVM时,使用bundle没有问题。转移到rbenv后,我在Jenkins的执行shell中收到“找不到命令”错误。我内爆并删除了RVM,并从~/.bashrc'中删除了所有与RVM相关的行。使用后我仍然收到此错误:rvmimploderm~/.rvm-rfrm~/.rvmrcgeminstallbundlerecho'exportPATH="$HOME/.rbenv/bin:$PATH"'>>~/.bashrcecho'eval"$(rbenvinit-)"'>>~/.bashrc.~/.bashrcrbenvversions

  5. ruby - 如何计算 Liquid 中的变量 +1 - 2

    我对如何计算通过{%assignvar=0%}赋值的变量加一完全感到困惑。这应该是最简单的任务。到目前为止,这是我尝试过的:{%assignamount=0%}{%forvariantinproduct.variants%}{%assignamount=amount+1%}{%endfor%}Amount:{{amount}}结果总是0。也许我忽略了一些明显的东西。也许有更好的方法。我想要存档的只是获取运行的迭代次数。 最佳答案 因为{{incrementamount}}将输出您的变量值并且不会影响{%assign%}定义的变量,我

  6. ruby-on-rails - 找不到 gem railties (>= 0.a) (Gem::GemNotFoundException) - 2

    我已经看到了一些其他的问题,尝试了他们的建议,但没有一个对我有用。我已经使用Rails大约一年了,刚刚开始一个新的Rails项目,突然遇到了问题。我卸载并尝试重新安装所有Ruby和Rails。Ruby很好,但Rails不行。当我输入railss时,我得到了can'tfindgemrailties。我当前的Ruby版本是ruby2.2.2p95(2015-04-13修订版50295)[x86_64-darwin15],尽管我一直在尝试通过rbenv设置ruby​​2.3.0。如果我尝试rails-v查看我正在运行的版本,我会得到同样的错误。我使用的是MacOSXElCapitan版本10

  7. ruby - 从外部访问类的实例变量 - 2

    我理解(我认为)Ruby中类变量和类的实例变量之间的区别。我想知道如何从该类外部访问该类的实例变量。从内部(即在类方法中而不是实例方法中),它可以直接访问,但是从外部,有没有办法做MyClass.class.[@$#]variablename?我没有任何具体原因要这样做,只是学习Ruby并想知道是否可行。 最佳答案 classMyClass@my_class_instance_var="foo"class上述yield:>>foo我相信Arkku演示了如何从类外部访问类变量(@@),而不是类实例变量(@)。我从这篇文章中提取了上述内

  8. 即使安装了 gem,Ruby 也找不到所需的库 - 2

    我花了几天时间尝试安装ruby​​1.9.2并让它与gems一起工作:-/我最终放弃了我的MacOSX10.6机器,下面是我的Ubuntu机器上的当前状态。任何建议将不胜感激!#rubytest.rb:29:in`require':nosuchfiletoload--mongo(LoadError)from:29:in`require'fromtest.rb:1:in`'#cattest.rbrequire'mongo'db=Mongo::Connection.new.db("mydb")#gemwhichmongo/usr/local/rvm/gems/ruby-1.9.2-p0/g

  9. ruby - Sinatra 找不到 View 目录 - 2

    我正在尝试以一种更类似于普通RubyGem结构的方式构建我的Sinatra应用程序。我有以下文件树:.├──app.rb├──config.ru├──Gemfile├──Gemfile.lock├──helpers│  ├──dbconfig.rb│  ├──functions.rb│  └──init.rb├──hidden│  └──Rakefile├──lib│  ├──admin.rb│  ├──api.rb│  ├──indexer.rb│  ├──init.rb│  └──magnet.rb├──models│  ├──init.rb│  ├──invite.rb│  ├─

  10. ruby - 在 SUSE 上找不到 Ruby 的头文件? - 2

    我正在尝试在SUSEEnterprise11SP3上安装compass。我得到以下信息。有什么想法吗?geminstallcompassBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingcompass:ERROR:Failedtobuildgemnativeextension./usr/bin/rubyextconf.rbmkmf.rbcan'tfindheaderfilesforrubyat/usr/lib64/ruby/ruby.hextconffailed,exitcode1Gemfileswi

随机推荐