public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: pmills@my-deja.com
To: help-gcc@gnu.org
Subject: stdc++ and shared objects
Date: Fri, 10 Dec 1999 06:30:00 -0000	[thread overview]
Message-ID: <82r2a3$u6l$1@nnrp1.deja.com> (raw)

I've recently moved from 2.8x gcc to 2.95.1 on Solaris 2.6.  There are
some real improvements, but I'm confused about using the C++ standard
libraries.

My application uses a number of shared objects/dynamic libraries (.so
files).  Within that code I use C++ standard classes such as <fstream>,
<map>, and a bunch of others.

With the 2.8 release and libstdc++.so, this worked fine, but with the
static version of stdc++ I'm not sure what I'm supposed to do.  If I
don't link with the .a library, I get unresolved symbols at run time
for anything in my .so that's not also in my primary executable (which
*is* linked against libstdc++.a).  If I try to link my .so explicitly
with libstdc++.a, it fails with a bunch of "Text relocation remains"
errors.  I assume this is because the .a file contents were not
compiled PIC.

Are there instructions somewhere for doing this?  Thanks in advance for
and hints or pointers.


Sent via Deja.com http://www.deja.com/
Before you buy.

WARNING: multiple messages have this Message-ID
From: pmills@my-deja.com
To: help-gcc@gnu.org
Subject: stdc++ and shared objects
Date: Fri, 31 Dec 1999 22:24:00 -0000	[thread overview]
Message-ID: <82r2a3$u6l$1@nnrp1.deja.com> (raw)
Message-ID: <19991231222400.xUPIv2uthDApN7CKxYGk8a0vgPfR99uNQKqBbl0LjiQ@z> (raw)

I've recently moved from 2.8x gcc to 2.95.1 on Solaris 2.6.  There are
some real improvements, but I'm confused about using the C++ standard
libraries.

My application uses a number of shared objects/dynamic libraries (.so
files).  Within that code I use C++ standard classes such as <fstream>,
<map>, and a bunch of others.

With the 2.8 release and libstdc++.so, this worked fine, but with the
static version of stdc++ I'm not sure what I'm supposed to do.  If I
don't link with the .a library, I get unresolved symbols at run time
for anything in my .so that's not also in my primary executable (which
*is* linked against libstdc++.a).  If I try to link my .so explicitly
with libstdc++.a, it fails with a bunch of "Text relocation remains"
errors.  I assume this is because the .a file contents were not
compiled PIC.

Are there instructions somewhere for doing this?  Thanks in advance for
and hints or pointers.


Sent via Deja.com http://www.deja.com/
Before you buy.

             reply	other threads:[~1999-12-10  6:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-10  6:30 pmills [this message]
1999-12-31 22:24 ` pmills

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='82r2a3$u6l$1@nnrp1.deja.com' \
    --to=pmills@my-deja.com \
    --cc=help-gcc@gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).