Why do you need '-lpthread'?
问题 So my questions is: Why do you need '-lpthread' at the end of a compiling command? Why does this command work: gcc -o name name.c -lpthread but this won't: gcc -o name name.c I am using the pthread.h library in my c code. I already looked online for some answers but didn't really find anything that answered it understandably 回答1: pthread.h is not a library it is just a header file which gives you declaration (not the actual body of function) of functions which you will be using for multi