Getting Errrors while building like: undefined reference to `google::protobuf::Message::SpaceUsed() const'

1,551 views
Skip to first unread message

$ag@r Takawane [B-08]

unread,
Sep 24, 2011, 6:18:16 AM9/24/11
to Protocol Buffers
Hi all,

I have compiled protobuf code(.cc generated by protoc), its
wrapper(.cc & c files) and made .a librabry..
while compiling i have provided prototypes of each refered function.
but while buiding executable linkable final outpu file I am facing
problem ....
getting lot of errors like undefined reference to
`google::protobuf::Message::SpaceUsed() const'...
undefined reference to `typeinfo for google::protobuf::Message'
undefined reference to
`google::protobuf::Message::DiscardUnknownFields()'
....
plz help me out....
thanks in advance.

Christopher Head

unread,
Sep 26, 2011, 5:29:40 PM9/26/11
to prot...@googlegroups.com
Did you include the output of "pkg-config --libs protobuf" in your
linker command line?

Chris

Reply all
Reply to author
Forward
0 new messages