Advertisement

Linux/GLX Tutorials Ubuntu

Started by August 28, 2005 09:58 PM
2 comments, last by DuneSoldier 19 years, 3 months ago
I was doing the NeHe tutorials on Debian Unstable back when it still used XF86. I only went as far as Tutorial 6 before I was bogged down with other things. Now I'm looking to pick them back up on my new laptop running Ubuntu "Hoary" and download lesson 1 linux/glx for review. However when I use the make command I get this output:
gcc -Wall -pedantic -ansi lesson01.c -o lesson01 -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm
lesson01.c: In function `main':
lesson01.c:295: warning: implicit declaration of function `exit'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0x2f): In function `__glXGetCurrentContext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0x53): In function `__glXGetCurrentContext':
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0x93): In function `__glXSetCurrentContext':
: undefined reference to `pthread_setspecific'
/usr/X11R6/lib/libGL.a(glxext.o)(.text+0xb0): In function `__glXSetCurrentContext':
: undefined reference to `pthread_key_create'
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0x46): In function `_glthread_InitTSD':: undefined reference to `pthread_key_create'
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0xaa): In function `_glthread_GetTSD':
: undefined reference to `pthread_getspecific'
/usr/X11R6/lib/libGL.a(glthread.o)(.text+0xf0): In function `_glthread_SetTSD':
: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make: *** [all] Error 1
Any Suggestions?
It seems to be a problem with the pthread library; have you (correctly) installed pthread dev libraries? If you have installed them manually(configure, make, make install) check that the installation path is in the LD_LIBRARY_PATH environment variable and if it isn't so update that variable or the configuration file ld.so.conf
Advertisement
A better look to your command line showed me that you haven't included the pthread library, to do this add -lpthread to the command line; this should fix it...obviously you have to have the library installed in your machine (search pthread-dev with synaptic)
I fixed the problem. I didn't have nvidia-glx-dev installed under ubuntu, just the nvidia-glx package. Sorry to bother you, but I guess that's what happens when you're bouncing between programming and sleep.

Thanks everyone.

This topic is closed to new replies.

Advertisement