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]

creating a shared library on RedHat6.2 using gcc


I am using gcc version (egcs - 1.1.2 release) and I want to create a
shared library, but I didn't succeeded. I have create a small example
"hello.c" and but I can't compile it.
I try it in different mode e.g.

gcc -fPIC -c hello.c
gcc -o hello.so -shared hello.o

gcc -o hello.so -Wl,-h,hello.so -shared hello.o

Here I get an error message:
"hello.so: file not recognized: File truncated
collect2: ld returns 1 exit status"

Can anybody help me, please.
If somebody have a small example with scripts please send it to me .

Thanks,
Denes




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