grpc libs c++ static linking

759 visualizzazioni
Passa al primo messaggio da leggere

smita deshpande

da leggere,
5 ott 2023, 09:59:1705/10/23
a grpc.io
Hello, 

I am trying to use helloworld *.pb files in my project and trying to link grpc and its dependent libraries (all the thirdparty and protobuf)  statically. I tried to use the order of libraries present in build.make file which gets generated in helloworld build folder. However, I am getting errors.


undefined reference to `absl::lts_20230802::log_internal::LogMessageFatal::LogMessageFatal(char const*, int, std::basic_string_view<char, std::char_traits<char> >)'
/usr/bin/ld: helloworld.pb.o: in function `helloworld::HelloReply::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&)':

Could anyone please help with this? 

Thanks,
Smita

veb...@google.com

da leggere,
11 ott 2023, 15:48:1911/10/23
a grpc.io
From the error message, linking to abseil library didn't seem to be done correctly. 
This example (https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/CMakeLists.txt) would be helpful to understand how it needs to be done.


Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi