My goal is pretty simple: get OpenGL up and running on my Linux box.
Since I’m running CentOS (Red Hat without the logos), I decided to play it safe and use YUM to install the proper libraries for my configuration:
yum install freeglut freeglut-devel libX11-devel mesa-libGLU-devel
I’ve also installed the proper Nvidia drivers.
Everything installed fine.
To try things out, I went ahead and used an example from here:
I chose dinoshade.c
When compiling using the following command:
gcc dinoshade.c -lglut
I get the following errors:
/tmp/ccItGNse.o: In function
main': dinoshade.c:(.text+0x1d1b): undefined reference toglPolygonOffsetEXT’
collect2: ld returned 1 exit status
I assumed it was a library linking problem, so I searched for gl.h and I got the following:
The gl.h from the first line is because of the Nvidia drivers I installed for the machine.
I’ve searched all over for a solution, but I’m not quite sure what the best way to go is at this point.
A-N-Y help would be greatly appreciated.
Thank you so much in advance.