Well, you declare a function called
void polygon(int a, int b, int c, int d, GLuint texture);
And then you implement a function called
void polgon(int a, int b, int c, int d, GLuint texture)
{
...
}
So the problem is that the linker is trying to find the function polygon
which you promised you would implement but didn't.
Solution: Rename polgon
to polygon
and you should be good to go.