When I try to link my program using gcc, it cannot find any of the gl procedures.

Here is the link line:

gcc obj/main.o obj/draw_gears.o obj/gl_drawing.o obj/load_data.o -lm -L/home/ccp/Desktop/code/Mesa -lGLw

The -lm got rid of the unresolved references to the math functions, and changing all the source file extensions from cpp to c (and recompiling everything) got rid of the "undefined reference to `__gxx_personality_v0' errors.

But I still get undefined references to every single gl call.

The strange part is that it is finding the library (libGLw.so) and that generated even more undefined references.

I tried using the separate libraries (GL, GLU & GLUT), but that didn't help either.

I started with animator (from Shobhan Dutta). It compiled and ran using Visual C on Windows, then converted to GLUT and it still worked on Windows. Had to download the GLUT for Windows stuff.

GLUT is supposed to work here or there, so I am trying to get this program in a state where it will compile and run on either Linux or Windows. This link problem has got me puzzled.

Here is a link to a list of the errors I get. libGLw.so is at the bottom.

error

PS:
- Changing from .cpp to .c was not a big deal, there wasn't much in the way of C++ stuff in the program in the first place.
- Using the Horrible Harry version of Ubuntu.