title: ld: warning: ignoring file
body: <pre><code>ld: warning: ignoring file file, file was built for unsupported file format ( 0x70 0x6F 0x6A 0x61 0x0A 0x6F 0x64 0x6F 0x64 0x6F 0x6B 0x64 0x6F 0x6B 0x64 0x6F ) which is not the architecture being linked (x86_64): file
  </code></pre>
  
  <p>This is my error after compile the program. In my program I want to print just the 80 characters on a file, named <code>file</code>.</p>
  
  <p>This is my program:</p>
  
  <pre><code>#include &lt;sys/types.h&gt;
  #include &lt;sys/uio.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;fcntl.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  
  void    print_80_char(char *path)
  {
      int i;
      int fd;
      char *buf;
  
      fd = open(path, O_RDWR);
      buf = malloc(sizeof(char) * 80);
      i = 0;
      while (buf[i] &lt;= 79)
      {
          read(fd, buf, 80);
          printf("%c", buf[i]);
          i++;
      }
  }
  </code></pre>
  
  <p>and my main is:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  
  void print_80_char(char *path);
  
  int main()
  {
      print_80_char("file");
      return 0;
  }
  </code></pre>