Take addressbook.proto as example, following command does not work:
c++
addressbook.pb.cc -o addressbook.o `pkg-config --cflags
protobuf`
Following are error output:
/usr/lib64/gcc/x86_64-unknown-linux/4.1.2/../../../../lib64/crt1.o: In
function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccjvcDzQ.o: In function `tutorial::Person::SharedDtor()':
addressbook.pb.cc:(.text+0x64a): undefined reference to
`google::protobuf::internal::kEmptyString'
addressbook.pb.cc:(.text+0x67f): undefined reference to
`google::protobuf::internal::kEmptyString'
/tmp/ccjvcDzQ.o: In function
`tutorial::Person_PhoneNumber::SharedDtor()':
addressbook.pb.cc:(.text+0x6c2): undefined reference to
`google::protobuf::internal::kEmptyString'
/tmp/ccjvcDzQ.o: In function `tutorial::Person_PhoneNumber::ByteSize()
const':
Have any idea?