This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Building shared library that uses libstdc++
- To: "Lundell, Jens O." <JENS dot O dot LUNDELL at saic dot com>
- Subject: Re: Building shared library that uses libstdc++
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 13 Apr 2001 17:09:39 -0300
- Cc: gcc-help at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <B225C80A3EFFD411AD830008C791869501B4DAE1@cp-its-exs02.mail.saic.com>
On Apr 13, 2001, "Lundell, Jens O." <JENS.O.LUNDELL@saic.com> wrote:
> g++ -fPIC -shared -o libjens.so source.cpp
> g++ -static -o jensexe source.cpp
> but when I combine the two I get the following error:
> ld: warning: option -d appears more than once, first setting taken
Do you mean, as in:
g++ -fPIC -shared -static -o libjens.so source.cpp ?
^^^^^^^^^^^^^^^
This just can't work.
> Do I have to distribute libstdc++.so.2.10.0 together with my shared library?
Specify the full pathname of libstdc++.a, and use the -mimpure-text
switch, such that the linker won't complain even though libstc++.a
contains non-PIC.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me