gcc -lGLU Flag Gives An Error
Heyas,
I was trying to compile the source code from NeHe's seconds OpenGL Lesson. When I try to compile the source using the included make file, I get the following error:
$ make
gcc -Wall -ansi lesson02.c -o lesson02 -lGL -lGLU `sdl-config --cflags --libs`
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
make: *** [all] Error 1
When I try to compile the same source file without the -lGLU tag, I get the following error:
$ gcc lesson02.c -o lesson02 -lSDL -lSDLmain -lGL
/tmp/ccQNySIB.o(.text+0x8a): In function `resizeWindow':
: undefined reference to `gluPerspective'
collect2: ld returned 1 exit status
If I go in and comment this line out, everything compiles, however the program does nothing. It is just a blank screen. So, I've narrowed down the problem and I think it is because the gluPerspective requires the -lGLU flag, but it will not work. I am running Slackware 10.0 and my gcc is version 3.3.4. Is there a package I do not have that I need to install to get the -GLU flag to work so I can compile these sample programs?
Thanks,
Chris
|