You try to use the displays
method in the main function, before declaring it. You need to either move the entire function before the main function or add the stub to the top:
void displays();
int main(int argc, char **argv){
...
}
void displays(){
...
}
C parses everything in the order it sees it - you cannot use a method that hasn't been declared in its entirety, or at least had a declaration that it will exist at some point.
In regards to your comments: The cannot find -l* stuff you are getting implies that you either haven't installed the development libraries for OpenGL or have them set up strangely - this is saying that it cannot find the library files to link against.
Additionally, the mykey
problem implies that you either haven;t declared a mykey
function or are not declaring it as per the prototype:
void mykey(unsigned char key, int x, int y)