I see the error collect2: error: ld returned 1 exit status very often. For example, I was trying to build the following snippet of code:
void main() {
char i;
printf("ENTER i");
scanf("%c", &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;
}
}
And I got this:
main.c:(.text+0x33): undefined reference to `clrscr'
collect2: error: ld returned 1 exit status
What does it mean?