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?
Linux/GLX Tutorials Ubuntu
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:
August 29, 2005 08:40 AM
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
August 29, 2005 08:43 AM
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)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement