title: undefined reference to `getline' in c
body: <p>I am learning to use getline in C programming and tried the codes from <a href="http://crasseux.com/books/ctutorial/getline.html" rel="noreferrer">http://crasseux.com/books/ctutorial/getline.html</a></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  int main(int atgc, char *argv[])
  {
      int bytes_read = 1;
      int nbytes = 10;
      char *my_string;
  
      my_string = (char *)malloc(nbytes+1);
  
      puts("Please enter a line of text");
  
      bytes_read = getline(&amp;my_string, &amp;nbytes, stdin);
  
      if (bytes_read == -1)
      {
          puts ("ERROR!");
      }
      else
      {
          puts ("You typed:");
          puts (my_string);
      }
  
      return 0;
   }
  </code></pre>
  
  <p>However, the problem is that the compiler keeps returning errors of this: <strong>undefined reference to 'getline'</strong>.
  Could you please tell me what the problem is? Thank you!</p>
  
  <p>I am using Win7 64bit + Eclipse Indigo + MinGW</p>