I'm trying to write a simple game using SDL and OpenGL. Up until now, I was using purely SDL and pixel manipulations on the framebuffer to draw lines and other shapes. However, as you would expect, that got unbearably slow as the number of objects on the screen increased.
Now I tried to switch to OpenGL. The includes work fine, SDL_GL_SetAttribute works fine, and SDL_SetVideoMode works fine so long as I don't use any purely OpenGL functions. However as soon as I try to use an opengl function (that I copied from a tutorial), my compiler gives me an Undefined Reference error for all the pure OpenGL functions.
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:47: undefined reference to `glViewport'
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:48: undefined reference to `glClearColor'
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:49: undefined reference to `glClearDepth'
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:50: undefined reference to `glDepthFunc'
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:51: undefined reference to `glEnable'
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:52: undefined reference to `glShadeModel'
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:53: undefined reference to `glMatrixMode'
/home/usrname/NetBeansProjects/SDLPROJ/main.cpp:54: undefined reference to `glMatrixMode'
As you can see, I'm using NetBeans and Ubuntu 9.04. Are there special linker options that I need to add for my program to be dynamically linked to the OpenGL dlls? Any help would be appreciated!