View Full Version : compiling assembly in linux with nasm

10-09-2009, 08:12 PM
So I started messing around with assembly but I am having some issues compiling.

From the directions on one page I followed i did

nasm -f elf program1.asm
ls program1.o -o program1

But then I got this error message

ld: i386 architecture of input file `program1.o' is incompatible with i386:x86-64 output

So I looked up the error and there wasnt a clear answer, but it seems the linker is trying to do 64 bit and nasm is doing 32bit? Am I on the right track?

10-09-2009, 09:10 PM
If your version of NASM is 2.00 or greater, try using "-f elf64" instead of "-f elf"