Is pthread.h built in the GCC compiler?

Or do I have to manually include it? I'm a beginner at pthreads & UNIX/Linux programming and I'm testing some code I found on the Net but I get the following compilation errors:
undefined reference to `pthread_create'
undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status

Recommendations on where I could get good pthreads tutorials are highly appreciated. Advanced thanks.
Last edited on
I get it now. =) I compiled it incorrectly. My previous compile command was like this:

1
2
 
g++ pHello.cpp -o pHello


When it should've been this:
 
g++ -pthread pHello.cpp -o pHello
Topic archived. No new replies allowed.