I've been trying to set up (Install and get the correct libraries) for my computer so I could start graphic programming.
I've visited the OpenGL site, and have found it unhelpful. I tried the Wikibooks' Setting up page, but that has install info specific to Debian and Debian like systems and I couldn't find the corresponding stuff for fedora.
I know C and python and would prefer to work in C if possible, I did find PyOpenGL.noarch and installed it using yum.
I looked up a couple of other sites and didn't find much but I managed to Install freeglut-devel
I checked and found the GL libraries in /usr/include/GL folder but when I try to run the following code{taken from the wikibooks site itself, so I'm assuming it works}:
#include <stdio.h> /* printf */
#include <GL/glut.h> /* glut graphics library */
/*
* Linux c console program
* gcc f.c -lglut
* ./a.out
* */
main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutCreateWindow("red 3D lighted cube");
printf("GL_VERSION = %s\n",glGetString(GL_VERSION) ); /* GL_VERSION = 2.1.2 NVIDIA 195.36.24 */
return 0;
}
And when I do gcc -lglut filename.c
I get the following errors:
/usr/bin/ld: /usr/lib/gcc/i686-redhat-linux/4.6.1/../../../libglut.so: undefined reference to symbol 'glGetString'
/usr/bin/ld: note: 'glGetString' is defined in DSO /usr/lib/libGL.so.1 so try adding it to the linker command line
/usr/lib/libGL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
And I have no Idea what to do.
A basic step-by-step procedure would be much appreciated but if any help is always welcome.