I’m compiling using:
gcc -o outfile infile.c -lpthread
and the only undefined reference is pthread_init.
I have tried using -pthread instead of -lpthread, as per some suggestions online.
I am including <pthread.h>
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t call
pthread_init(). It’s not necessary on Linux.