Hi, Experts I am trying protobuf. Now I can compile the .proto file and link my application with the generated .pb.cc. But my application needs shared library during run time. so I set "--disable-shared" when running ./configure. There is no shared library installed in the dist-dir. But when I compile my application (g++ -Iinclude -Llib -lprotobuf addrbook.pb.cc myaddrbook.cc -o myab), many error messages are printed like below:
... /var/tmp//ccQ1rC2J.o(.gnu.linkonce.r._ZTIN8tutorial18Person_PhoneNumberE+0x8): undefined reference to `typeinfo for google::protobuf::Message' /var/tmp//ccZ6l9nt.o(.text+0x493): In function `main': : undefined reference to `google::protobuf::internal::VerifyVersion(int, int, char const*)' /var/tmp//ccZ6l9nt.o(.text+0x5a9): In function `main': : undefined reference to `google::protobuf::Message::ParseFromIstream(std::istream*)' /var/tmp//ccZ6l9nt.o(.text+0x6ab): In function `main': : undefined reference to `google::protobuf::Message::SerializeToOstream(std::ostream*) const' /var/tmp//ccZ6l9nt.o(.text+0x736): In function `main': : undefined reference to `google::protobuf::ShutdownProtobufLibrary()' I have searched the mail thread, but have no valuable findings. Could someone shed me some light about it? Is it feasible to disable protobuf shared library in my application? Thanks & regards. --Liuhy -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.