जॉइन Examsbook
1375 0

प्र: Undefined reference to 'pthread_create' How to Fix this error?

  • उत्तर देखेंउत्तर छिपाएं
  • Workspace

उत्तर :
व्याख्या :

This is a common error while compiling C program in Linux. This error occurs when you are using pthread_create function to create threads in your programs. To fix this problem ensure following points:Include header file pthread.h in your program.Add –lpthread linker flag with compilation command.1- Include Header file #include #include ... ...2- Compile command gcc main.c -o main -lpthread

क्या आपको यकीन है

  त्रुटि की रिपोर्ट करें

कृपया संदेश दर्ज करें
त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई