This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: About libstdc++ link staticlly


On Mar  8, 2000, greg zhang <gregzh@yahoo.com> wrote:

> To a normal project(I mean exe module), I can do it
> with just removing libstdc++.so.2.8.1.1.,  gcc will
> link libstdc++.a archive file automaticlly.

> Text relocation remains            reference file
>  against symbol      
> <unknown>                          ..../XXX.o
> fprintf                            ..../XXX.o

> ld: fatal: relocation remains against allocatable but
> non-writable sections.

> I don't know how to fix it?

You'd have to compile all objects of the static libstdc++ with -fPIC
to be able to link a shared library with it.

-- 
Alexandre Oliva     http://www.ic.unicamp.br/~oliva/     Enjoy Guaranį
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]