Is it possible to build a protobuff without pthread?

You must use protocol buffers for a real-time OS where there is no pthread. I can bind 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?

+6
source share
1 answer

Not really. See this unresolved issue.

Someone corrected protobuf older version that does not depend for pthreads, it see. Here - you can look at, is it you need, and possibly direct port.

Also note that you must use pkg_config to get the correct compiler and linker flags when using protobuf, for example.

 pkg-config --cflags protobuf # compiler flags pkg-config --libs protobuf # linker flags 
+6
source

All Articles