There is a need to use Protocol Buffers on the real-time OS where there is no pthread. I am able to link protobuf statically this way
g++ -g -Wall example.pb.cc example.cc -o example -static -lprotobuf -lpthread
However without pthread I get link errors. Is it possible to configure protobuf to work without pthread?
Protobuf strings are always valid UTF-8 strings. See the Language Guide: A string must always contain UTF-8 encoded or 7-bit ASCII text.
Protobufs work fine over HTTP in their native binary format.
"Protobuf (Protocol buffers) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler.
Not really. See this unresolved issue.
Someone has patched an older protobuf version to not depend on pthreads, see here - which you might take a look at if you really need it, and possibly forward port.
Also note that you're supposed to use pkg_config to get the proper compiler and linker flags when using protobuf, e.g.
pkg-config --cflags protobuf # compiler flags
pkg-config --libs protobuf # linker flags
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With