NVIDIA / GLU problem

Hello,

I have recently updated to XFree86 4.1.0 using NVIDIA 1.0-1251 drivers. The NVIDIA drivers were compiled against XFree 4.0.2 and until recently nothing appeared to be broken.
Now I am trying to compile a simple tutorial (lesson 03 off of NeHe’s site) and I am getting the error output:

gcc -Wall -pedantic -ansi lesson03.c -o lesson03 -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm
/usr/X11R6/lib/libGLU.so: undefined reference to sqrt' /usr/X11R6/lib/libGLU.so: undefined reference to floor’
/usr/X11R6/lib/libGLU.so: undefined reference to cos' /usr/X11R6/lib/libGLU.so: undefined reference to sin’
collect2: ld returned 1 exit status
make: *** [all] Error 1

I am curious if anyone has hit this before or might clue a newbie in some elementary OpenGL system setup :slight_smile: Thanks in advance.

p.s I am running RH 7.1

add -lm to that command line.

You need to link in the math library.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.