LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what is the difference between -lpthread, -pthread, -lthread? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-difference-between-lpthread-pthread-lthread-799065/)

nithima 03-31-2010 03:46 AM

what is the difference between -lpthread, -pthread, -lthread?
 
Hello,

I would like to know what is the difference between -lpthread, -pthread, -lthread?

Sometimes, I have been used -lpthread as a option of gcc.
but I don't understand anything about the others.

Thank you for your help.

--
JB

smeezekitty 03-31-2010 09:01 PM

-lpthread is correct and the others probably will not work.

grail 03-31-2010 09:52 PM

Ok ... so after doing a 'man gcc' I found:

-l<library> - used for linking libraries

-pthread - IA-64 option

-lpthread - link libpthread library into code

-lthread - on my systems I could not find a library called libthread, but assuming this is installed by some other software, this is what would be linked in


All times are GMT -5. The time now is 03:37 AM.