Getting OpenGL 4.2 working - compiler issues

I have started the ‘OpenGL Book’, I can create a context and a window, but I am having compile issues with the second tutorial (http://openglbook.com/the-book/chapter-2-vertices-and-shapes/)

I think that anything added in v3.0 is throwing it, eg:

glGenBuffers(…) throws: 'undefined reference to ‘_imp___glewGenBuffers’

Windows 7, Code::Blocks and MinGW. I am pretty sure that I have the latest versions of freeGLUT and GLEW set up

Anyone know anything?

Seems to be a linker problem. Have you set glew32.lib in your linker settings? I’m not sure about other IDEs, in Visual Studio, try:
Project Properties->Configuration Properties->Linker->Input. Add glew32.lib there. This should work fine.