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: creating a shared library on RedHat6.2 using gcc


On Oct  2, 2000, Denes Demeter <demeterd@ots.codec.ro> wrote:

> gcc -o hello.so -Wl,-h,hello.so -shared hello.o
> "hello.so: file not recognized: File truncated

IIRC, this is a bug in collect2.  It inserts some object file between
`-h' and `hello.so'.  Run gcc with -v -Wl,-v to know for sure.  Just
move the -Wl flag after the first object file and all will be fine.

> If somebody have a small example with scripts please send it to me .

How about libtool?  It will print the commands it uses to create
shared libraries, so you can just follow the examples.

-- 
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

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