[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthread



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>
and
	-lpth

//Thorsten
-- 
Willst Du wegen dummer User immer 'Ja, ich will' nach einem rm an /dev/tty
eingeben müssen?		-- Bodo Eggert in de.alt.sysadmin.recovery