Mingw not reading glUseProgram(0) from object file

I am unsure whether the problem I am having is mingw compile options or a mismatch between SDL_opengl.h and the opengl32.dll on Windows XP. Basically the program is written in c with GL_VERSION of 3.2 and GL_SHADING_LANGUAGE_VERSION of 4. If I run the program with glUseProgram(0) commented out the program compiles and displays the clear colored window as it ought. But when I uncomment glUseProgram(0) the compile fails with:

D:\TEMP\ccSTF4cr.o:App.c:(.text+0x320): undefined reference to 'glUseProgram

I understand that Windows only wants to load basic opengl functionality but I thought SDL2 is no longer compatible with GLEW etc and I can find no code examples that deal with this issue.