Paulfjujo has a fix for you but the real problem is this:
Code:
void delay(unsigned int);
I think you intended to create a function called 'delay' but the semicolon ended the definition and no code was produced. Later when you used the function it couldn't find it.
I think the real problem is that the prototype for the function delay() can't be between main() and the opening curly brace.
It must be before main() or after the curly brace.
The space before the opening brace was in early C versions used to define the parameter types. Only the names were present inside the parentheses.