It appears you are not linking against libprotobuf.lib.

On Wed, Apr 8, 2009 at 8:28 AM, <scotty2...@gmail.com> wrote:

>
> I think part of my problem was using precompiled headers in the
> project. I've removed that option and recreated my project, but I
> still get these linker errors:
>
> backupcomm error LNK2019: unresolved external symbol "public: static
> class google::protobuf::MessageFactory * __cdecl
> google::protobuf::MessageFactory::generated_factory(void)" (?
> generated_fact...@messagefactory@proto...@google@@sapav...@xz)
> referenced in function "public: __thiscall backupcomm::Actions::Actions
> (void)" (??0acti...@backupcomm@@q...@xz)
> backupcomm error LNK2019: unresolved external symbol "public: static
> void __cdecl
> google::protobuf::MessageFactory::InternalRegisterGeneratedMessage
> (class google::protobuf::Descriptor const *,class
> google::protobuf::Message const *)" (?
> internalregistergeneratedmess...@messagefactory@proto...@google
> @@saxpbvdescrip...@23@pbvmess...@23@@Z)
> referenced in function "void __cdecl
> backupcomm::protobuf_BuildDesc_def_2eproto_AssignGlobalDescriptors
> (class google::protobuf::FileDescriptor const *)" (?
> protobuf_builddesc_def_2eproto_assignglobaldescript...@backupcomm
> @@yaxpbvfiledescrip...@protobuf@google@@@Z)
> backupcomm 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 *,int)" (??
> 0generatedmessagereflect...@internal@proto...@google@@q...@pbvdescriptor
> @2...@pbvmessage@2...@qbhhhhpbvdescriptorpool@2...@h@Z)
> referenced in function "void __cdecl
> backupcomm::protobuf_BuildDesc_def_2eproto_AssignGlobalDescriptors
> (class google::protobuf::FileDescriptor const *)" (?
> protobuf_builddesc_def_2eproto_assignglobaldescript...@backupcomm
> @@yaxpbvfiledescrip...@protobuf@google@@@Z)
> backupcomm error LNK2019: unresolved external symbol "public: static
> class google::protobuf::DescriptorPool const * __cdecl
> google::protobuf::DescriptorPool::generated_pool(void)" (?
> generated_p...@descriptorpool@proto...@google@@sapbv...@xz) referenced
> in function "void __cdecl
> backupcomm::protobuf_BuildDesc_def_2eproto_AssignGlobalDescriptors
> (class google::protobuf::FileDescriptor const *)" (?
> protobuf_builddesc_def_2eproto_assignglobaldescript...@backupcomm
> @@yaxpbvfiledescrip...@protobuf@google@@@Z)
> backupcomm error LNK2019: unresolved external symbol "public: class
> google::protobuf::FileDescriptor const * __thiscall
> google::protobuf::DescriptorPool::InternalBuildGeneratedFile(void
> const *,int,void (__cdecl*)(class google::protobuf::FileDescriptor
> const *))" (?
> internalbuildgeneratedf...@descriptorpool@proto...@google
> @@qaepbvfiledescrip...@23@PBXHP6AXPBV423@@z...@z)
> referenced in function "void __cdecl
> backupcomm::protobuf_BuildDesc_def_2eproto(void)" (?
> protobuf_builddesc_def_2epr...@backupcomm@@YAXXZ)
> backupcomm error LNK2019: unresolved external symbol "public: static
> class google::protobuf::DescriptorPool * __cdecl
> google::protobuf::DescriptorPool::internal_generated_pool(void)" (?
> internal_generated_p...@descriptorpool@proto...@google@@sapav...@xz)
> referenced in function "void __cdecl
> backupcomm::protobuf_BuildDesc_def_2eproto(void)" (?
> protobuf_builddesc_def_2epr...@backupcomm@@YAXXZ)
> backupcomm error LNK2019: unresolved external symbol "void __cdecl
> google::protobuf::internal::VerifyVersion(int,int,char const *)" (?
> verifyvers...@internal@proto...@google@@yaxhh...@z) referenced in
> function "void __cdecl backupcomm::protobuf_BuildDesc_def_2eproto
> (void)" (?protobuf_builddesc_def_2epr...@backupcomm@@YAXXZ)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> bool __thiscall google::protobuf::Message::SerializeWithCachedSizes
> (class google::protobuf::io::CodedOutputStream *)const " (?
> serializewithcachedsi...@message@proto...@google
> @@ube_npavcodedoutputstr...@io@23@@Z)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> int __thiscall google::protobuf::Message::SpaceUsed(void)const " (?
> spaceu...@message@proto...@google@@UBEHXZ)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> int __thiscall google::protobuf::Message::ByteSize(void)const " (?
> bytes...@message@proto...@google@@UBEHXZ)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> bool __thiscall google::protobuf::Message::MergePartialFromCodedStream
> (class google::protobuf::io::CodedInputStream *)" (?
> mergepartialfromcodedstr...@message@proto...@google
> @@uae_npavcodedinputstr...@io@23@@Z)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> void __thiscall google::protobuf::Message::DiscardUnknownFields
> (void)" (?discardunknownfie...@message@proto...@google@@UAEXXZ)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> bool __thiscall google::protobuf::Message::IsInitialized(void)const
> " (?isinitiali...@message@proto...@google@@UBE_NXZ)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> void __thiscall google::protobuf::Message::Clear(void)" (?
> cl...@message@proto...@google@@UAEXXZ)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> void __thiscall google::protobuf::Message::MergeFrom(class
> google::protobuf::Message const &)" (?
> mergef...@message@proto...@google@@UAEXABV123@@Z)
> backupcomm error LNK2001: unresolved external symbol "public: virtual
> void __thiscall google::protobuf::Message::CopyFrom(class
> google::protobuf::Message const &)" (?
> copyf...@message@proto...@google@@UAEXABV123@@Z)
> backupcomm error LNK2019: unresolved external symbol "public: virtual
> __thiscall google::protobuf::Message::~Message(void)" (??
> 1mess...@protobuf@google@@u...@xz) referenced in function
> __unwindfunclet$??0mess...@backupcomm@@q...@xz$0
> backupcomm error LNK2019: unresolved external symbol "public:
> __thiscall google::protobuf::UnknownFieldSet::UnknownFieldSet
> (void)" (??0unknownfield...@protobuf@google@@q...@xz) referenced in
> function "public: __thiscall backupcomm::Message::Message(void)" (??
> 0mess...@backupcomm@@q...@xz)
> backupcomm error LNK2001: unresolved external symbol "private: virtual
> void __thiscall google::protobuf::Message::SetCachedSize(int)const " (?
> setcacheds...@message@proto...@google@@eb...@z)
> backupcomm error LNK2019: unresolved external symbol "public:
> __thiscall google::protobuf::UnknownFieldSet::~UnknownFieldSet
> (void)" (??1unknownfield...@protobuf@google@@q...@xz) referenced in
> function __unwindfunclet$??0mess...@backupcomm@@q...@abv01@@Z$0
> backupcomm error LNK2019: unresolved external symbol "public:
> __thiscall google::protobuf::internal::ExtensionSet::~ExtensionSet
> (void)" (??1extension...@internal@proto...@google@@q...@xz) referenced
> in function __unwindfunclet$??0acti...@backupcomm@@q...@xz$0
> backupcomm error LNK2019: unresolved external symbol "public:
> __thiscall google::protobuf::internal::ExtensionSet::ExtensionSet
> (class google::protobuf::Descriptor const * const *,class
> google::protobuf::DescriptorPool const *,class
> google::protobuf::MessageFactory *)" (??
> 0extension...@internal@proto...@google@@q...@pbqbvdescriptor
> @2...@pbvdescriptorpool@2...@pavmessagefactory@23@@Z)
> referenced in function "public: __thiscall backupcomm::Actions::Actions
> (void)" (??0acti...@backupcomm@@q...@xz)
>
>
>
> On Apr 7, 6:21 pm, Kenton Varda <ken...@google.com> wrote:
> > What are the errors?
> >
> > On Tue, Apr 7, 2009 at 3:58 PM, <scotty2...@gmail.com> wrote:
> >
> > > I am trying to get started using pb, but I am stuck. I've got my
> > > messages compiled into their .h and .cc parts, i've added those to my
> > > project. I built protobuf in vs 2009, and I've added the
> > > protobuf-2.0.3\src directory as an include location and the output
> > > from the build as an additional library location. However, I can't
> > > build my project (which has nothing other than the protoc generated .h
> > > and .cc files). I get a bunch of linker errors, did I miss something?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to