title: What does "collect2: error: ld returned 1 exit status" mean?
body: <p>I see the error <code>collect2: error: ld returned 1 exit status</code> very often. For example, I was executing the following snippet of code:</p>
  
  <pre><code>void main() {
    char i;
  
    printf("ENTER i");
    scanf("%c",&amp;i);
  
    clrscr();
  
    switch(i) {
      default:
        printf("\nHi..\n");
        break;
      case 1:
        printf("\n\na");
        break;
      case 2:
        printf("\nb\n");
        break;
      case 3:
        printf("\nc");
        break;
    }
  }
  </code></pre>
  
  <p>and I got this:</p>
  
  <pre><code>main.c:(.text+0x33): undefined reference to `clrscr'                       
  collect2: error: ld returned 1 exit status 
  </code></pre>
  
  <p>What does it mean?</p>