LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  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,339

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

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



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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration