pthread now required?

7 views
Skip to first unread message

daveb

unread,
May 14, 2009, 1:25:33 PM5/14/09
to Protocol Buffers
Just got a complaint from a user saying that they needed to add -
lpthread to link against protoc.
I hadn't heard of the pthread change by the way -- was that expected?

It might be nice if there was a pkg-config file for protoc so that -
lpthread can be sucked up exactly when needed.

Kenton Varda

unread,
May 14, 2009, 4:04:48 PM5/14/09
to daveb, Protocol Buffers
Yes, linking against pthreads is required.  Technically it always was, but on certain platforms (e.g. Linux), it just happened that the set of pthread functions used by libprotobuf were all implemented in libc itself, so if you forgot to use -lpthead it worked anyway.

I suppose that should be in the readme.
Reply all
Reply to author
Forward
0 new messages