Which lib for pthreads?

Giorgos Keramidas keramida at ceid.upatras.gr
Sun Mar 6 13:41:10 PST 2005


On 2005-03-06 21:32, Jonathon McKitrick <jcm at FreeBSD-uk.eu.org> wrote:
>On Sat, Mar 05, 2005 at 07:18:31PM -0600, Dan Nelson wrote:
>:In the last episode (Mar 05), Jonathon McKitrick said:
>:> Linux lets me use -pthread, but under BSD I get 'undefined symbol
>:> "pthread_mutex_lock."'
>:>
>:> What's the correct linker syntax for pthreads?
>:
>: That would be it.  It should work on 4.* and 5.*.
>
> I found -lc_r does the trick.  Not what I was expecting.

-lpthread should work too.



More information about the freebsd-questions mailing list