This is the error when i run the example code (address book)

[ph...@localhost examples]$ make cpp
pkg-config --cflags protobuf  # fails if protobuf is not installed
-pthread
c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --
cflags --libs protobuf` -lprotobuf -lprotoc
/tmp/ccyavNPd.o: In function
`tutorial::protobuf_BuildDesc_addressbook_2eproto()':
addressbook.pb.cc:(.text+0x1300): undefined reference to
`google::protobuf::DescriptorPool::InternalBuildGeneratedFile(void
const*, int)'
addressbook.pb.cc:(.text+0x1382): undefined reference to
`google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor
const*, google::protobuf::Message const*, int const*, int, int, int,
google::protobuf::DescriptorPool const*)'
addressbook.pb.cc:(.text+0x140b): undefined reference to
`google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor
const*, google::protobuf::Message const*, int const*, int, int, int,
google::protobuf::DescriptorPool const*)'
addressbook.pb.cc:(.text+0x1504): undefined reference to
`google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor
const*, google::protobuf::Message const*, int const*, int, int, int,
google::protobuf::DescriptorPool const*)'
/tmp/ccyavNPd.o: In function
`google::protobuf::internal::GenericRepeatedField::GenericRepeatedField()':
addressbook.pb.cc:
(.text._ZN6google8protobuf8internal20GenericRepeatedFieldC2Ev[google::protobuf::internal::GenericRepeatedField::GenericRepeatedField()]
+0x8): undefined reference to `vtable for
google::protobuf::internal::GenericRepeatedField'
/tmp/ccyavNPd.o: In function
`google::protobuf::RepeatedPtrField<tutorial::Person>::~RepeatedPtrField()':
addressbook.pb.cc:
(.text._ZN6google8protobuf16RepeatedPtrFieldIN8tutorial6PersonEED1Ev[google::protobuf::RepeatedPtrField<tutorial::Person>::~RepeatedPtrField()]
+0xa1): undefined reference to
`google::protobuf::internal::GenericRepeatedField::~GenericRepeatedField()'
addressbook.pb.cc:
(.text._ZN6google8protobuf16RepeatedPtrFieldIN8tutorial6PersonEED1Ev[google::protobuf::RepeatedPtrField<tutorial::Person>::~RepeatedPtrField()]
+0xc5): undefined reference to
`google::protobuf::internal::GenericRepeatedField::~GenericRepeatedField()'
/tmp/ccyavNPd.o: In function
`google::protobuf::RepeatedPtrField<tutorial::Person>::~RepeatedPtrField()':
addressbook.pb.cc:
(.text._ZN6google8protobuf16RepeatedPtrFieldIN8tutorial6PersonEED0Ev[google::protobuf::RepeatedPtrField<tutorial::Person>::~RepeatedPtrField()]
+0xa1): undefined reference to
`google::protobuf::internal::GenericRepeatedField::~GenericRepeatedField()'
addressbook.pb.cc:
(.text._ZN6google8protobuf16RepeatedPtrFieldIN8tutorial6PersonEED0Ev[google::protobuf::RepeatedPtrField<tutorial::Person>::~RepeatedPtrField()]
+0xc5): undefined reference to
`google::protobuf::internal::GenericRepeatedField::~GenericRepeatedField()'
/tmp/ccyavNPd.o: In function
`google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::~RepeatedPtrField()':
addressbook.pb.cc:
(.text._ZN6google8protobuf16RepeatedPtrFieldIN8tutorial18Person_PhoneNumberEED1Ev[google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::~RepeatedPtrField()]
+0xa1): undefined reference to
`google::protobuf::internal::GenericRepeatedField::~GenericRepeatedField()'
/tmp/ccyavNPd.o:addressbook.pb.cc:
(.text._ZN6google8protobuf16RepeatedPtrFieldIN8tutorial18Person_PhoneNumberEED1Ev[google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>::~RepeatedPtrField()]
+0xc5): more undefined references to
`google::protobuf::internal::GenericRepeatedField::~GenericRepeatedField()'
follow
/tmp/ccyavNPd.o:
(.rodata._ZTIN6google8protobuf16RepeatedPtrFieldIN8tutorial6PersonEEE[typeinfo
for google::protobuf::RepeatedPtrField<tutorial::Person>]+0x8):
undefined reference to `typeinfo for
google::protobuf::internal::GenericRepeatedField'
/tmp/ccyavNPd.o:
(.rodata._ZTIN6google8protobuf16RepeatedPtrFieldIN8tutorial18Person_PhoneNumberEEE[typeinfo
for google::protobuf::RepeatedPtrField<tutorial::Person_PhoneNumber>]
+0x8): undefined reference to `typeinfo for
google::protobuf::internal::GenericRepeatedField'
collect2: ld returned 1 exit status
make: *** [add_person_cpp] Error 1




Any one Please help me, i am trying from 1 week.
Please.....

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@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