Most of the code up using is from the openGL 3.2 samples to get me up and running. Only different in the fragment shader is I and using version 130 since I cant run shaders 140-150;
glBindFragDataLocation is undefined with a bogus address of 0.
You need to get the address of this extension either manually (not recommended) or use one of the helper libraries – glew or GLee. Note, despite this glew reference http address, the latest glew version supports GL3.2! GLee may ot may not be so up to date.
I use glew – checkout the Basic usage Section to get started. It is a simple matter to just call glewInit and link to the glew library at compile time.
However, even if you do get one, your code won’t work. Presumably, your “createProgram” function actually links the program together, right? Well, that’s no good. glBindFragDataLocation, just like attribute binding, must be done before linking. Not after.