Hi All,

I have a problem with compiling the C code in 64bit mode on solaris 10. I get 
the error "wrong ELF class : ELFCLASS64"

I am using  gcc version 4.0.2  and i do the following steps for the 
compilation/link.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/opt/gcc/bin/g++ -g -c -D_UNIX -m64  ../test.c -o test.o

/opt/gcc/bin/gcc test.o -o test.exe -L/usr/lib/sparcv9 -L/opt/gcc/lib/sparcv9 
-R/usr/lib/sparcv9 -R/opt/gcc/lib/sparcv9 -ldl 
-Wl,-Bstatic,-lstdc++,-lm,-Bdynamic 

ld: fatal: file test.o: wrong ELF class: ELFCLASS64

ld: fatal: File processing errors. No output written to test.exe

collect2: ld returned 1 exit status

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It looks like the test.o is generated correctly because when i do file test.o , 
it shows :
test.o:  ELF 64-bit MSB relocatable SPARCV9 Version 1


Thanks
-Ajit
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-help mailing list
opensolaris-help@opensolaris.org

Reply via email to