ld can't find libglut on RHEL 5.6

I’m currently compiling the example programs in the SDK for version 4.1. I currently get the following error:

/usr/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status

However, I do have both 64-bit and 32-bit versions of freeglut rpm package installed:

[chemadm@rnuusprgpu01 C] rpm -qf /usr/lib64/libglut.so.3 freeglut-2.4.0-7.1.el5 [chemadm@rnuusprgpu01 C] rpm -qf /usr/lib/libglut.so.3
freeglut-2.4.0-7.1.el5

Do I need a newer version of freeglut? I don’t remember seeing this error with version 4.0 in the past. I setup my environment like so for the compile:

cd /dbs/apps/cuda-4.1/NVIDIA_GPU_Computing_SDK/C
setenv PATH /dbs/apps/cuda-4.1/cuda/bin:/usr/bin:/bin:/usr/sbin:/sbin
setenv LD_LIBRARY_PATH /dbs/apps/cuda-4.1/cuda/lib64:/usr/lib64:/lib64
unsetenv PYTHONPATH
unsetenv PYTHONHOME
make | tee make.out

So I do have /usr/lib64 in my LD_LIBRARY_PATH above. Anyone else seen this linker error with libglut before?

Thanks,
Philippe

Noone has run into this error? Tried searching but could not find it in the forum so far.

Maybe the doc http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_Getting_Started_Linux.pdf will help:
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
and further notes.

linking requires the dynlib symlink, which is packaged in the freeglut-devel rpm:

$ rpm -qil freeglut-devel|grep libglut

/usr/lib64/libglut.so

davide