Linking OpenGL

I’m following the lazyfoo tutorial on using OpenGL with SDL and I’m trying to convert to Ada as I go. I’m getting a linker error when it tries to resolve the binding I had to add for glCreateProgram (the official bindings are pretty good, but not quite comprehensive).

Long story short, this means that somehow it’s not finding this symbol exported the way it’s expecting to… as if I’m missing a dll, or somehow not calling it properly. I couldn’t get the above GLEW stuff going either, but I sorta suspected that was indeed a separate tool and moved on to see how far I could get without it.

Does anybody know of any common trip-ups attempting to link OpenGL?

My binding:

subtype GLuint is Uint32;

function glCreateProgram return GLuint;
pragma Import(C, glCreateProgram, "glCreateProgram");

You probably need GLEW for that. Most OpenGL implementations only provide a very minimal set of functionality directly in the DLL, and then you use GLEW to get the rest of the functions as function pointers. (Not sure how Ada handles function pointers, but it looked like what you were trying to do there was a DLL function import, and that just won’t be available to you.)