but when I compile a simple application with nothing except glBegin( GL_POINTS ); and glEND() I always get
/tmp/ccNQpAvJ.o(.text+0x16): In function main': : undefined reference to glBegin’
collect2: ld returned 1 exit status
I even tried copying and pasting all the code from GL/gl.h into the source file that I called glBegin and glEnd from, but I still always get the same error. Only by editing the soruce to give a body to teh glBegin and glEnd functions in GL/gl.h do the errors go away. Am I missing some sort of include file that has the definitions for those functions??
Having a very hard time trying to learn OpenGL programming if I cant use any of the functions
You need to link with the GL library by adding ‘-lGL’ to your link line. You may also need to add the path using the -L option. Either -L/usr/X11R6/lib or -L/usr/lib depending on where libGL.so lives on your system.