LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 03-31-2010, 03:46 AM   #1
nithima
LQ Newbie
 
Registered: Jan 2010
Posts: 10

Rep: Reputation: 0
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
 
Old 03-31-2010, 09:01 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,208

Rep: Reputation: 147Reputation: 147
-lpthread is correct and the others probably will not work.
 
Old 03-31-2010, 09:52 PM   #3
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,185

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 04:26 AM
what is lpthread? cnivas Linux - Enterprise 1 09-18-2008 08:53 AM
libtest.a uses pthread: user of libtest.a should not link pthread again debulu Programming 2 01-31-2007 09:23 PM
pthread zaman Programming 6 08-29-2004 04:04 PM
lpthread install on RedHat, THREADS luftwaffe Linux - Newbie 1 07-05-2002 09:41 AM


All times are GMT -5. The time now is 11:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration