linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Dynamically linking to pthread library
@ 2006-04-05 10:02 Usha Rani Konudula
  2006-04-05 13:20 ` Dustin Lang
  0 siblings, 1 reply; 2+ messages in thread
From: Usha Rani Konudula @ 2006-04-05 10:02 UTC (permalink / raw)
  To: linuxppc-dev

Do you need to explicitly specify -pthread option to g++ to make the
target library link with pthread dynamically. Otherwise does it
statically link to pthread library on ppc64 power5.

Kindly let me know.

Thanks
Usha.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Dynamically linking to pthread library
  2006-04-05 10:02 Dynamically linking to pthread library Usha Rani Konudula
@ 2006-04-05 13:20 ` Dustin Lang
  0 siblings, 0 replies; 2+ messages in thread
From: Dustin Lang @ 2006-04-05 13:20 UTC (permalink / raw)
  To: Usha Rani Konudula; +Cc: linuxppc-dev


Hi,

> Do you need to explicitly specify -pthread option to g++ to make the 
> target library link with pthread dynamically. Otherwise does it 
> statically link to pthread library on ppc64 power5.

You can use "ldd" to tell you which libraries are dynamically linked to an 
executable.  Read "man ldd" for more details.  You can add the "-v" 
(verbose) flag to your g++ link command, which will tell you the full 
details of what it's linking in.

My guess is that you need to specify "-pthread" explicitly.  What happens 
if you create a program that calls a pthread function and you don't 
specify "-pthread".  Does it link?  If it does, then the compiler is 
getting that pthread definition from _somewhere_.  What does "g++ -v" tell 
you?  What does "ldd" tell you?

By the way, a better way to ask questions on a mailing list is to explain 
what you're trying to do, what you've tried to do to achieve it, and why 
it didn't work.  It usually helps to be explicit about each step.  Show 
that you've tried to figure it out for yourself.

Cheers,
dstn.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-05 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-05 10:02 Dynamically linking to pthread library Usha Rani Konudula
2006-04-05 13:20 ` Dustin Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).