title: Can't Compile C++ Code With Sleep() on Linux - Which Library to Include?
body: <p>I'm trying to compile some code that uses the line:</p>
  
  <pre><code>Sleep(10);
  </code></pre>
  
  <p>In my IDE, all I have to do is either write:</p>
  
  <pre><code>using namespace std;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>#include &lt;unistd.h&gt;
  </code></pre>
  
  <p>and it compiles fine!</p>
  
  <p>However, when compiling via the command line on Linux, everything is <em>not</em> OK. The compiler tells me that <code>Sleep</code> is undefined. I compile using:</p>
  
  <pre><code>g++ -lglut -lGL -lm -o PROGRAM.exe PROGRAM.cpp
  </code></pre>
  
  <p>Other code I have written that does not use <code>Sleep</code> compiles fine in this way.</p>
  
  <p>What library do I need to supply to the linker (with <code>-l</code>) to get the <code>Sleep</code> function recognized?</p>