Building shared library that uses libstdc++
Alexandre Oliva
aoliva@redhat.com
Fri Apr 13 13:09:00 GMT 2001
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
More information about the Gcc-help
mailing list