I have an OpenGL application which requires the use of a vector in more than one OpenGL function. As far as I know the best way of dealing with this is to declare the vector in a header file, and include the header file in all the files containing the OpenGL functions.
The problem is that I get a multiple definition error at the linker stage. What is the best solution to this? Is there a better way of doing it without globals?