title: Library that has reference to fork() in C
body: <p>What is the library that defines fork(). I am learning to use fork(). I found out that the Standard I/O Library : <code>stdio.h</code>  is enough for fork() to work but that does not apply in my case.</p>
  
  <p>I am using <code>gcc</code> in <code>Code::Blocks</code> on <code>Windows 8 Pro</code> </p>
  
  <p>My Code is: </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;malloc.h&gt;
  #include &lt;time.h&gt;
  
  int main(void)
  {
  
      pid_t process;
      process = fork();
  
      if(process&lt; 0)
      {
          printf("fork failed");
      }
      if(process &gt; 0)
      {
          printf("\nParent Process Executed");
      }
  
      if(process == 0)
      {
          printf("\nChild Process Executed");
      }
      return 0 ;
  }
  </code></pre>
  
  <p>The Exact Error I get is:</p>
  
  <blockquote>
    <p>useoffork.o:useoffork.c:(.text+0xf): undefined reference to `fork'</p>
  </blockquote>