Hello all, I am trying to build my application in 64-bit mode.
My command line for compilation is :- # CC -mt [b]-64[/b] -o /export/home1/etpki/obj/sol_i386_5.10/libtme/test1/test1 -R/usr/lib/amd64 /export/home1/etpki/obj/sol_i386_5.10/libtme/test1/test1.o /export/home1/etpki/obj/sol_i386_5.10/libtme/test1/../libtme.a -lposix4 The error reported is as follows:- CC: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise ld: fatal: file /export/home1/etpki/obj/sol_i386_5.10/libtme/test1/test1.o: [b]wrong ELF class: ELFCLASS64[/b] ld: fatal: File processing errors. No output written to /export/home1/etpki/obj/sol_i386_5.10/libtme/test1/test1 Doing file on test1.o shows:- bash-3.00# file /export/home1/etpki/obj/sol_i386_5.10/libtme/test1/test1.o /export/home1/etpki/obj/sol_i386_5.10/libtme/test1/test1.o: [b]ELF 64-bit[/b] LSB relocatable AMD64 Version 1 bash-3.00# which ld /usr/bin/ld bash-3.00# ls -l /usr/bin/ld lrwxrwxrwx 1 root other 21 Mar 7 13:43 /usr/bin/ld -> /usr/ccs/bin/amd64/ld So, as the file output shows, the .o is 64-bit. So, the linker should create the test1 binary in 64-bit mode, instead it reports this wrong ELF class error. Machine specifications: Solaris 10 x86_64 bit Compiler: Sun Studio 11 Any help will be grateful, Thanks, Anunay This message posted from opensolaris.org
