Undefined Reference to VBO functions

I am compiling using MingW with the following flags:

-lmingw32 -mwindows -lopengl32 -lglu32 -lwinmm -lws2_32

And in my project I include the following lines:

#include <gl/gl.h>
#include <gl/glu.h>
#define GL_GLEXT_PROTOTYPES
#include “…/lib/glext.h”

However if I attempt to use any VBO related functions such as:

glBindBuffer
glBindBufferARB
glBufferData
glBufferDataARB

I get an undefined reference to them.

[QUOTE=Quaver;1253320]However if I attempt to use any VBO related functions such as:

glBindBuffer
glBindBufferARB
glBufferData
glBufferDataARB

I get an undefined reference to them.[/QUOTE]

On Windows, opengl32.dll only exports the functions which are part of the OpenGL 1.1 API. For anything added after that, you have to use wglGetProcAddress() to obtain a pointer to the function (the OpenGL headers define the relevant pointer types), or use a library such as GLEW to do it for you.

Note that the function pointers can vary between contexts, so you shouldn’t obtain a pointer with one context then use it with another context unless you know that the contexts are compatible. This is mainly an issue for heterogeneous multi-headed systems, where different screens may be using different OpenGL drivers. But in that situation you also run into the issue that the OpenGL version, supported extensions, implementation limits, etc will differ between screens.