If that's all you get for the error, this is a pretty shitty message. This is a challenge with calls.
From my glu.h :
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
_GLUfuncptr defined as:
typedef void (GLAPIENTRYP _GLUfuncptr)();
from
#ifndef GLAPIENTRYP #define GLAPIENTRYP GLAPIENTRY * #endif #ifndef GLAPIENTRY #if defined(_MSC_VER) || defined(__MINGW32__) #define GLAPIENTRY __stdcall #else #define GLAPIENTRY #endif #endif
This explains the difference between Linux and mingw.
From this, you might think that you need to declare your callback as
void GLAPIENTRY errorCallback();
and a __stdcall will be applied to it when necessary.
However, as Ali points out in the comments below, slapping GLAPIENTRY on a callback signature does not always work. It seems that the GLU 1.3 spec simply indicates that void (*func)() accepted. Since some implementations require, instead of _GLUfuncptr , which includes the GLAPIENTRY requirement, but others do not define GLAPIENTRY at all, there is a portability problem.
A possible workaround might be:
#ifndef GLAPIENTRY #define GLAPIENTRY #endif
and declare all callbacks with the GLAPIENTRY macro nonetheless.
Thomas
source share