I am new to OpenGL and am working on cleaning up someone else’s code in Linux. My problem is that whenever I call glutDisplayFunc(class::myfunc_display) or glutReshapeFunc(class::myfunc_reshape), I get the error message:
error: argument of type void (class:: ) (int, int)' does not match void (*)(int, int)’ for glutRehapeFunc()
and
error: argument of type void (class:: ) ()' does not match void (*)()’ for glutDisplayFunc()
What puzzles me is that this code has run before with the same functions in the same class as they are now. This leads me to believe that I am missing an essential line of code, but as I am new, I do not know what that might be. I do include <glut.h> in my header file and the following lines run without incident:
I mis-typed the message originally and switched what error goes to what function. You are correct in that the display function does not expect any arguments, and the protype function does not have any arguments.
My error messages are:
error: argument of type void (class:: (int, int)' does not matchvoid (*)(int, int)’ for glutRehapeFunc()
and
error: argument of type void (class:: ()' does not matchvoid (*)()’ for glutDisplayFunc()
The original post has also been edited to correct my mistake.