MinGW + Eclipse:从' void中键入无效转换

时间:2015-09-02 04:12:45

标签: c++ c eclipse mingw

字符串:

glDebugMessageCallbackARB(&DebugOutputCallback, NULL);

给我错误:

  

描述资源路径位置输入来自' void的无效转换   (属性(( stdcall )))(GLenum,GLenum,GLuint,GLenum,   GLsizei,const GLchar ,GLvoid *){又无效   (属性(( stdcall )))(unsigned int,unsigned int,unsigned   int,unsigned int,int,const char ,void *)}'到了' GLDEBUGPROCARB {又名   void( attribute (( stdcall )))(unsigned int,unsigned int,   unsigned int,unsigned int,int,const char ,const void *)}'   [-fpermissive]

请告诉我有什么不对?

1 个答案:

答案 0 :(得分:1)

编译器试图告诉您回调函数的签名应为

void (*)(GLenum, GLenum, GLuint, GLenum, GLsizei, GLchar, GLvoid const*)

您传递的回调的最后一个参数是GLvoid*,它应该是GLvoid const*