Reputation: 5067
I think I may have a problem with my installation of openGL. I am working on a CentOS 6.6 cluster. I'm looking for canonical "hello world" type examples of openGL code.
It appears that these examples are 20+ years old and don't compile.
E.g.
~$ gcc cube.c -lglut
/tmp/ccRTbnOw.o: In function `init':
cube.c:(.text+0x2d9): undefined reference to `gluPerspective'
cube.c:(.text+0x325): undefined reference to `gluLookAt'
collect2: error: ld returned 1 exit status
The openGL was installed in the mesa rpm :
mesa-libGL-devel-10.1.2-2.el6.x86_64
Upvotes: 0
Views: 172
Reputation: 52082
Those are linker errors, it looks like it's compiling just fine.
You have to link against libGL
& libGLU
too:
gcc cube.c -lglut -lGL -lGLU
Upvotes: 2