Compiling problems with glut

Hi,
I’m using Slackware Linux 9.1, with Glut 3.7 library (package from distribution).
Every time I try to compile some example programs which use glut, I get some compiling errors like:
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0x28): In function _glthread_InitTSD': : undefined reference topthread_key_create’
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0x83): In function _glthread_GetTSD': : undefined reference topthread_getspecific’
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0xc5): In function _glthread_SetTSD': : undefined reference topthread_setspecific’

I tried to compile many examples and every time I get these errors. Please help.