You need to link with the flag -64. However it is not recommended that 
you directly invoke the linker, since the linker doesn't know about some 
language specific libraries.

cc -m64 -o outfile obj1.o obj2.o...

Regards,

Darryl.


On 03/17/10 14:12, John Vasquez wrote:
> Newbie here.
> 
> I compile some source code using cc -m64
> 
> However, I can't seem to link the objects. I'm getting the error,"Relocatable 
> linking with relocation from elf64-x86-64 to format elf32-i386 is not 
> supported". 
> 
> My ld command line is:
> ld -r -o outfile obj1.o obj1.o
> 
> What am I doing wrong?

-- 
Darryl Gove
Compiler Performance Engineering
Blog : http://blogs.sun.com/d/
Books: http://www.sun.com/books/catalog/solaris_app_programming.xml
        http://my.safaribooksonline.com/0595352510

Reply via email to