linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dustin Lang <dalang@cs.ubc.ca>
To: Usha Rani Konudula <UshaRani.Konudula@borland.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Dynamically linking to pthread library
Date: Wed, 5 Apr 2006 06:20:51 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.60.0604050603250.2128@tin.icics.ubc.ca> (raw)
In-Reply-To: <C9CDA704CB0EEA4DBE2EFC05AE11851C1C6A8A@SGSGS-EXCH01.apac.borl.net>


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.

      reply	other threads:[~2006-04-05 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-05 10:02 Dynamically linking to pthread library Usha Rani Konudula
2006-04-05 13:20 ` Dustin Lang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.60.0604050603250.2128@tin.icics.ubc.ca \
    --to=dalang@cs.ubc.ca \
    --cc=UshaRani.Konudula@borland.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).