Setting up gl3w in my computer: 2 errors that I have no idea how to resolve are being thrown:
Function that’s built by Gl3w script which has the errors:
static void *get_proc(const char *proc) - line 19
{
void *res;
res = wglGetProcAddress(proc); - line 23, first error
if (!res)
res = GetProcAddress(libgl, proc); - line 25, second error
return res;
}
Build errors:
||=== LearnOPG, Debug ===|
C:\CodeBlocks\LearnOPG\gl3w.c||In function 'void* get_proc(const char*)':|
C:\CodeBlocks\LearnOPG\gl3w.c|23|error: invalid conversion from 'PROC {aka int (__attribute__((__stdcall__)) *)()}' to 'void*' [-fpermissive]|
C:\CodeBlocks\LearnOPG\gl3w.c|25|error: invalid conversion from 'FARPROC {aka int (__attribute__((__stdcall__)) *)()}' to 'void*' [-fpermissive]|
||=== Build finished: 2 errors, 0 warnings (0 minutes, 0 seconds) ===|
Some compilers/platforms are less picky than others. Implicitly converting function pointers to
void*and back is not guaranteed to be possible by C or C++. But GL3W’s code expects it to work; obviously, it was not tested with more strict compilers/platforms.You should probably file a bug report on it with the GL3W people. Granted, it doesn’t seem to be being actively worked on, but they might fix it.