Linking error on RHEL5

When trying to compile the examples on Redhat EL5 I get the following error when the nbody example tries to compile. I haven’t found any reference to this error anywhere. Any help would be appreciated.

in file included from bodysystemcuda.cu:39:

../../common/inc/GL/glut.h:64:1: warning: "APIENTRY" redefined

In file included from ../../common/inc/GL/glut.h:59,

				 from bodysystemcuda.cu:39:

/usr/include/GL/gl.h:104:1: warning: this is the location of the previous definition

../../lib/libparamgl.a(paramgl.cpp.o): In function `ParamList::Write(std::basic_ostream<char, std::char_traits<char> >&)':

paramgl.cpp:(.text._ZN9ParamList5WriteERSo[ParamList::Write(std::basic_ostream<char, std::char_traits<char> >&)]+0x1a): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'

paramgl.cpp:(.text._ZN9ParamList5WriteERSo[ParamList::Write(std::basic_ostream<char, std::char_traits<char> >&)]+0x31): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'

collect2: ld returned 1 exit status

make[1]: *** [../../bin/linux/release/nbody] Error 1

make[1]: Leaving directory `/usr/local/home/d9892/NVIDIA_CUDA_SDK/projects/nbody'

make: *** [projects/nbody/Makefile.ph_build] Error 2