OpenCL samples, undefined reference

Discussion created by david_va on Nov 23, 2011
Latest reply on Nov 28, 2011 by david_va

I'm trying to compile the OpenCL samples included in the AMD SDK, but I keep running into the following error:




Building build/debug/x86_64/BoxFilterGL

g++ -o build/debug/x86_64/BoxFilterGL build/debug/x86_64//BoxFilterGL.o build/debug/x86_64//BoxFilterGLSeparable.o build/debug/x86_64//BoxFilterGLSAT.o -lpthread -ldl -L/usr/X11R6/lib   -lSDKUtil  -lglut  -lGLEW  -lOpenCL   -L../../../../../lib/x86_64  -L../../../../../TempSDKUtil/lib/x86_64 -L"/lib/x86_64"  

/usr/bin/ld: build/debug/x86_64//BoxFilterGLSeparable.o: undefined reference to symbol 'gluPerspective'

/usr/bin/ld: note: 'gluPerspective' is defined in DSO /usr/lib64/libGLU.so.1 so try adding it to the linker command line

/usr/lib64/libGLU.so.1: could not read symbols: Invalid operation



I'm using the KDE spin of Fedora 16 (I know it's not officially supported) with the newest freeglut libraries available in the repositories (I think version 2.6?)  I know I can specify the -libglu in the linker options, but I'm not sure where to add the command as the Makefiles traverse multiple subdirectories.  Can anyone offer a suggestion on where to make the fix?  Thanks!