title: Undefined reference to fork() in Code::Blocks editor in Windows OS
body: <p>When I am running below code in Code::Blocks in Windows OS.
  I used to get an error called undefined reference to fork().
  I did set/choose GCC compiler as my default compiler.</p>
  
  <pre><code>#include&lt;stdio.h&gt;       
  #include&lt;unistd.h&gt;          
  void main()          
  {       
   int x;       
   x = 0;       
   fork();       
   x = 1;        
   ...     
   ....    
  }
  </code></pre>
  
  <p>Please help me and tell me, can I right unix/linux programs in Code::Blocks in windows environment?</p>
  
  <p>And I write another program,</p>
  
  <pre><code>main()
  {
    int x = 0;
    if(x == 0)
    {
      printf("X = %d", x);
      sleep(1000);//used delay also
      x = 1;
      printf("Now X = %d", x);;
    }
  }
  </code></pre>
  
  <p>Here it gives eroor that undefined reference to sleep() and / * delay also* /.<br>
  Please help me.</p>