Linking an assembler program: error “undefined reference to `printf'”
I'm trying to compile this x86 assembly code on x64 Debian : BITS 32 %include 'training.s' global main extern exit ; =============================================== section .text main: ; The program begins here: call read_hex mov edx,eax call read_hex add eax,edx add eax,eax inc eax call print_eax ; Exit the process: push 0 call exit I'm getting these errors: ~$nasm -f elf -g 0_strange_calc.asm && ld -o 0_strange_calc 0_strange_calc.o ld: i386 architecture of input file `0_strange_calc.o' is incompatible with i386:x86-64 output ld: warning: cannot find entry symbol _start; defaulting to