you should show us your linker command line. On Thu, Jun 1, 2023 at 9:38 AM Seongjoon Kang <[email protected]> wrote: > > Hi > I tried to compile a simple code as example of protobuf. > But I used to have the following error messages. > Codes are attached. Could you help me correct these bugs ? > Thanks > > /usr/bin/ld: /tmp/ccdiZiDW.o: in function `main': > ex1.cc:(.text+0x142): undefined reference to > `tutorial::SearchRequest::~SearchRequest()' > /usr/bin/ld: ex1.cc:(.text+0x16b): undefined reference to > `tutorial::SearchRequest::~SearchRequest()' > /usr/bin/ld: /tmp/ccdiZiDW.o: in function > `google::protobuf::internal::ArenaStringPtr::Set(char const*, > google::protobuf::Arena*)': > ex1.cc:(.text._ZN6google8protobuf8internal14ArenaStringPtr3SetEPKcPNS0_5ArenaE[_ZN6google8protobuf8internal14ArenaStringPtr3SetEPKcPNS0_5ArenaE]+0x4e): > undefined reference to > `google::protobuf::internal::ArenaStringPtr::Set(absl::lts_20230125::string_view, > google::protobuf::Arena*)' > /usr/bin/ld: /tmp/ccdiZiDW.o: in function > `tutorial::SearchRequest::SearchRequest()': > ex1.cc:(.text._ZN8tutorial13SearchRequestC2Ev[_ZN8tutorial13SearchRequestC5Ev]+0x1d): > undefined reference to > `tutorial::SearchRequest::SearchRequest(google::protobuf::Arena*)' > collect2: error: ld returned 1 exit status > > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/protobuf/79041063-f686-4819-a52e-ca211557eef0n%40googlegroups.com.
-- ---> Dirk Jagdmann ----> http://cubic.org/~doj -----> http://llg.cubic.org -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/CAHPuVMJERn5bzDHR4TaWAAunMU6HVQayiWoKXPyMGj%3DrwHGP5g%40mail.gmail.com.
