[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is this true for 3.1? I know I've always heard use -pthread, but why
are there times that -pthread does not work, and -lpthread does?
Also I just installed gnu pth 2.0 (not from ports) and here is the
first line of my /usr/local/include/pthread.h:
** GNU Pth - The GNU Portable Threads
I'm sure it also installed:
So why am I using the OS's pthread when I call -lpthread, and if that
is true how would I call gnu pth?
And if that is true, then why does GNU pth 2 install libpthread.* and
Thanks very much.
On Saturday, May 24, 2003, at 04:03 AM, Thorsten Glaser wrote:
> begin electrogrammati illius Flinn Mueller
>> What exactly is the difference between -pthread and -lpthread?
> -pthread is a switch that tells gcc you want threads.
> -lpthread is a switch for the linker that tells it you
> want to link against libpthreads. THIS IS NOT
> ENOUGH! Use -pthread instead.
>> Also, what is the difference between pth (GNU) pthread.h, and
>> lc_r/include/pthread.h (OpenBSD)?
> The latter is gone away.
>> If I call -lc_r am I using lc_r/include/pthread.h (OpenBSD)
> No, -l is just for the library. Your programme will
> include pthread.h by itself.
>> If I call -lpthread am I using gnu pth?
> No, that would be a port (devel/pth), which gets
> #include <pth.h>
> Willst Du wegen dummer User immer 'Ja, ich will' nach einem rm an
> eingeben müssen? -- Bodo Eggert in de.alt.sysadmin.recovery
- Re: pthread
- From: Thorsten Glaser <email@example.com>