Dynamic Libraries under Solaris
Alexandre Oliva
aoliva@cygnus.com
Tue May 2 09:41:00 GMT 2000
On May 2, 2000, Vinu V Nair <vinu@sasi.com> wrote:
> g++ -o libname.so -shared source.o
> where source.o is obtained as follows
> g++ -c source.cxx,
You're missing -fPIC.
> NB: This (both gcc and g++) works fine in Linux.
GNU ld isn't as strict WRT -fPIC as Solaris' linker. But it's
advantageous to use it on GNU/Linux too, since it allows for sharing
of code pages.
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
More information about the Gcc-help
mailing list