Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22448

Why do you need '-lpthread'?

$
0
0

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


Viewing all articles
Browse latest Browse all 22448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>