title: Undefined reference to sleep() in Windows using glibc
body: <p>I made a simple snippet of code to record what the user input:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  
  int main() {
    char letter;
    printf("Enter in a character:");
    scanf("%c", &amp;letter);
    sleep(2);
    printf("Letter was: %c", letter);
    return 0;
  }
  </code></pre>
  
  <p>In this code, it's supposed to sleep for 2 seconds on line 8.</p>
  
  <p>Unfortunately, sleep is an undefined reference, even though I have the correct <a href="http://www.gnu.org/software/libc/manual/html_node/Sleeping.html" rel="nofollow">library</a>.</p>
  
  <p>Is there any way to fix this problem in <strong>Windows Vista</strong>?</p>