[lug] pthreads

Tom Tromey tromey at cygnus.com
Tue May 30 16:32:42 MDT 2000

>>>>> "Kevin" == Kevin King <kevin at precisonline.com> writes:

Kevin> Based on the premise that a library wasn't being linked, I
Kevin> modified the gcc command to include the /usr/lib/libpthread.so,
Kevin> but I didn't think it would work (last resort, you know?).

Yes, you must link thread programs with -lpthread.

Kevin> It caused the above error to go away, but now I get a seg fault
Kevin> when trying to run the program -- right at the pthread_create.

Without seeing your code, we can't be sure of what is going on.  The
likeliest problem is that you have a bug in your code.  Threaded
programs work fine for me.


More information about the LUG mailing list