tags:

views:

266

answers:

2

Using Code::Blocks w/ mingw, and trying to use GLee for some OpenGL on windows. I'm getting the following build errors:

GLee.c|60|undefined reference to `_wglGetProcAddress@4'
GLee.c|10748|undefined reference to `_wglGetProcAddress@4'
GLee.c|10751|undefined reference to `_wglGetCurrentDC@0'
GLee.c|10797|undefined reference to `_glGetString@4'
GLee.c|10910|undefined reference to `_glGetString@4'
GLee.c|10976|undefined reference to `_glGetString@4'

And I'm just including GLee likes so (with GLee.c, not the .dll):

#include "GLee.h"

According to Ben Woodhouse, GLee is "written in pure ANSI C, so any C or C++ compiler should work. You can include the source files in your projects directly or compile them into a library", so I should be having no problems.

Google didn't give me much on this, so I'm hoping some OpenGL vets (or anyone familiar with GLee) out there can point me in the right direction.

+2  A: 

It looks like you need to link your application against the OpenGL libraries (specifically Opengl32.lib) which will provide the functions that you are missing. Perhaps the OpenGL FAQ might be of help in figuring this out.

heavyd
A: 

I'm having these problems too. I've tried building the library itself (which builds fine) and just shoving in the .c. Both work fine with ARB functions but anything else causes linker errors. I've included all of the GL libraries I can think of for both the library and my program. It just doesn't work. Are shaders impossible under Code::Blocks or is it just me?

Ne'XEkho