Well, this must be a silly one. Here below is a can-not-be-simpler code in C. It can not compile saying "undefined reference to sleep". But I think I include all system header I need...
#include <stdio.h>
#include <unistd.h>
int main()
{
printf("Test starts.\n");
sleep(1);
printf("Test ends.\n");
return 1;
}