LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-30-2007, 08:23 AM   #1
debulu
Member
 
Registered: May 2006
Location: India
Distribution: Redhat
Posts: 49

Rep: Reputation: 15
libtest.a uses pthread: user of libtest.a should not link pthread again


Hi all,
I have developed a library which uses pthread library calls. I want the users of my library doesn't have to call -lpthread when they link their program with my library. How can I achieve this ...

Regards
 
Old 01-30-2007, 10:46 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Users of your library *should* call "-lpthread".

If you want, you could take all the stuff lib your version of "libpthread.a" (ar xv) and add it all to your library. But that would be unwise - it would be a maintenance headache for you, and for your users.

Alternatively, you could simply ship a copy of "libpthread" (atatic or shared) with your library (as a courtesy for those users who might not happen to have their own local copy).

IMHO .. PSM
 
Old 01-31-2007, 09:23 PM   #3
debulu
Member
 
Registered: May 2006
Location: India
Distribution: Redhat
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks paulsm4 for you reply..

But if I am using libtool for the same purpose the users of the library have to have libtool... Am I right here??

Regards
 
  


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
Pthread JanusPaul Programming 8 02-09-2005 05:46 PM
pthread and C++ gt73 Programming 17 11-04-2003 03:01 AM
about pthread c12ayon Programming 6 10-25-2003 04:37 AM
need help about pthread c12ayon Programming 1 10-24-2003 07:47 AM
Pthread rch Programming 1 05-28-2003 02:20 AM


All times are GMT -5. The time now is 08:23 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