title: unable to compile assembly: /usr/bin/ld: i386 architecture of input file `array1.o' is incompatible with i386:x86-64 output
body: <p>I am using Kali linux 64 bit and I am trying to execute the following programs from Dr. Paul carter's website.  The gcc command is giving errors.  What should I use in the gcc command?</p>
  
  <pre><code>nasm -f elf32 array1.asm
  root@kali:assembly# gcc -o array1 array1.o array1c.c
  array1c.c:9:1: warning: ‘cdecl’ attribute ignored [-Wattributes]
  array1c.c:10:1: warning: ‘cdecl’ attribute ignored [-Wattributes]
  /usr/bin/ld: i386 architecture of input file `array1.o' is    incompatible    with i386:x86-64 output
  collect2: error: ld returned 1 exit status
  </code></pre>