I've been using SDL for a while with no problems, but I want to use OpenGL now (through SDL).
So when I say #include "SDL/SDL_opengl.h", I expect it to be included. But then, why do I get all these errors?
obj\Debug\main.o||In function `Z7init_GLv':|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|141|undefined reference to `glClearColor@16'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|143|undefined reference to `glMatrixMode@4'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|144|undefined reference to `glLoadIdentity@0'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|145|undefined reference to `glOrtho@48'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|147|undefined reference to `glMatrixMode@4'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|148|undefined reference to `glLoadIdentity@0'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|150|undefined reference to `glGetError@0'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\WorkSpace\OpenGL Graphics\SDL_Work.h|152|undefined reference to `glGetError@0'|
||=== Build finished: 8 errors, 0 warnings ===|
I tried, to no avail,
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h>
but that didn't really do anything. Some things are defined (like GL_STACK_OVERFLOW and other GLenums), but these won't be defined. I don't know what .lib files extra I'm supposed to be including. I though I might see them in MinGW/include/GL, but that had only .h files, as I should have guessed.
So, what do I do? I searched and found a ton of threads on this, but none really helped me.