extension loading .lib

I am currently attempting to create an extension system. I’m trying to set it up as a static linked library that includes the glext.h and wglext.h headers. I’ve defined both GL_GLEXT_PROTOTYPES and WGL_WGLEXT_PROTOTYPES before including the headers so all the function prototypes are defined in the headers just waiting to be initialised with calls to wglGetProcAddress(). Currently I get unresolved external symbols as I’ve yet to persuade the main app to acknowledge the existence of the extension lib - or at least the fact that it (should) contain the function prototypes. I suspect I need to define the prototypes in the .cpp they are to be used in, but haven’t been able to find the right syntax yet.

Apologies if this is just plain wrong and won’t ever work, but its late and I can’t see beyond the idea at the moment. I would really like to be able to handle all the extension loading external to the main app to reduce any platform specific code to a bare minimum.

Originally posted by paulc:
[b]I am currently attempting to create an extension system. I’m trying to set it up as a static linked library that includes the glext.h and wglext.h headers. I’ve defined both GL_GLEXT_PROTOTYPES and WGL_WGLEXT_PROTOTYPES before including the headers so all the function prototypes are defined in the headers just waiting to be initialised with calls to wglGetProcAddress(). Currently I get unresolved external symbols as I’ve yet to persuade the main app to acknowledge the existence of the extension lib - or at least the fact that it (should) contain the function prototypes. I suspect I need to define the prototypes in the .cpp they are to be used in, but haven’t been able to find the right syntax yet.

Apologies if this is just plain wrong and won’t ever work, but its late and I can’t see beyond the idea at the moment. I would really like to be able to handle all the extension loading external to the main app to reduce any platform specific code to a bare minimum.[/b]

Why don’t you just use the existing ones? Like glew (http://glew.sf.net) or extgl (levp.de).

Those are crossplatform too.

I really like glew, but I never got it working with nvparse. There were always unresolved references (I tried windows & linux). Has anyone succeeded with glew or some other open, cross platform library?

Yeah, I’d started off looking for the existing libraries. Think I either was very lame with my googling or managed to click on every link except the right one . Ended up using extgl, didn’t take too much too get it working. Haven’t tried anything with any vert progs or pixel shaders yet though.