Hi,
I have installed cuda7.5 toolkit on ubuntu, I had to update these paths in the .bashrc file:
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
export PATH=$PATH:/usr/local/cuda/bin
all seems fine with the install, I am able to run most of the samples but I am trying to run some code that uses #include <GL/glut.h>, I have built the project using Nsight and have added the include path in the include paths but when I build it, I get the following errors:
Description Resource Path Location Type
make: *** [test1] Error 1 test1 C/C++ Problem
undefined reference to glClearColor' test.cu /test1 line 82 C/C++ Problem undefined reference to
glDrawPixels’ test.cu /test1 line 47 C/C++ Problem
undefined reference to glutCreateWindow' test.cu /test1 line 79 C/C++ Problem undefined reference to
glutDisplayFunc’ test.cu /test1 line 80 C/C++ Problem
undefined reference to glutInit' test.cu /test1 line 76 C/C++ Problem undefined reference to
glutInitDisplayMode’ test.cu /test1 line 78 C/C++ Problem
undefined reference to glutInitWindowSize' test.cu /test1 line 77 C/C++ Problem undefined reference to
glutKeyboardFunc’ test.cu /test1 line 81 C/C++ Problem
undefined reference to glutMainLoop' test.cu /test1 line 84 C/C++ Problem undefined reference to
glutPostRedisplay’ test.cu /test1 line 59 C/C++ Problem
undefined reference to glutSwapBuffers' test.cu /test1 line 48 C/C++ Problem undefined reference to
glutTimerFunc’ test.cu /test1 line 60 C/C++ Problem
undefined reference to `glutTimerFunc’ test.cu /test1 line 83 C/C++ Problem
I then thought i would try to compile in the terminal but got this error
nvcc -o test test.cu -lm -lGL -lglut
/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status
any help is very much appreciated
mark