One declaration returns the type of the GLUTproc function (indicating a function that takes no arguments), and the other declaration returns a pointer ( void* ). Both functions accept the same arguments (one const char* ). What the compiler says is true.
You only see the complaint about "overload" because it is C ++. In C ++, if the compiler believes that it sees two different functions with the same name, each of them must have different arguments (for example, a different number of arguments or different types).
In this case, I doubt that the functions should be different; they must be the same, and at some point the API evolved and changed the declaration.
You need to find a way to prevent both ads from displaying at the same time (perhaps by setting GLUT_API_VERSION ). If you need, you can #include only one of the files and see if you really need another file (and if you did, you may have to manually declare some things to avoid the second #include ).
source share