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

Re: pthreads



On Tue, 23 Mar 1999, Simon Martin wrote:

> I am developing a C++ socket class that I wish to operate completely
> independently from the caller. To do this, I am trying to use pthreads to
> spawn a listening thread that will handle all coenection requests. I do this
> quite often and succesfully on NT, but when I compile with g++ I get the
> error that it can't find "pthread_create" or "pthread_join", two functions I
> use. I tried explicitly telling g++ to use the /lib/libpthreads-0.7-1.so,
> but it still comes back with the same error. This seams to be the only
> pthread on my system so I wonder what's going on.

Try -lpthread at the end of the g++ link line ie

g++ -o myapp *.o -lpthread

Jason


Reply to: