skaslev / gl3w

Simple OpenGL core profile loading
http://github.com/skaslev/gl3w
The Unlicense
705 stars 157 forks source link

g++ error in compilation: invalid converstion from 'void*' to 'void (*)()' #13

Closed ghost closed 11 years ago

ghost commented 11 years ago

I'm using the fix for issue #11 "Error in compilation invalid conversion from (void)() to void" which was fixed in issue #12 (I'm using the fork that has it fixed that requested a pull). But now I'm getting "Error in compilation invalid conversion from void* to void(*)() on the line "res = dlsym(libgl, proc)" below. It's line 82 in gl3w.cpp. I'm also using g++ and Linux.

static gl3wProc get_proc(const char proc) { gl3wProc *res;

res = glXGetProcAddress((const GLubyte *) proc);
if (!res)
    res = dlsym(libgl, proc);  //<------ THIS LINE HAS THE ERROR
return res;

}