This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Shared library that needs stuff from another library...
On Sep 7, 1999, Mark Crosland <mjc@c1000907-b.sttls1.wa.home.com> wrote:
> Is there a way (link flag?) to build my shared lib against a statically
> built libstdc++, i.e., when I build my lib, the linker pulls in the stuff
> my lib needs from libstdc++.a?
Not portably. This works on some platforms (most notably those that
emit PIC by default, most notably alpha and mips), but on others you'd
have to compile all the object files of libstdc++.a with -fPIC, and on
others it just won't work. There is some work planned for GNU libtool
to support C++ (and, particularly, g++) and, at that point, it'll have
to deal with this mess. Meanwhile, you'll probably have to develop
platform-specific solutions.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them